mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Completion for bash
This commit is contained in:
parent
933cced76c
commit
f36a9fffa3
2 changed files with 31 additions and 0 deletions
14
completion/bash/kitty.sh
Normal file
14
completion/bash/kitty.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
kitty_completions() {
|
||||
local src
|
||||
local limit
|
||||
# Send all words up to the word the cursor is currently on
|
||||
let limit=1+$COMP_CWORD
|
||||
src=$(printf "%s\n" "${COMP_WORDS[@]: 0:$limit}" | kitty +complete bash)
|
||||
if [[ $? == 0 ]]; then
|
||||
eval ${src}
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F kitty_completions kitty
|
||||
Loading…
Add table
Add a link
Reference in a new issue