This repository has been archived on 2021-04-14. You can view files and clone it, but cannot push or open issues/pull-requests.
bare-dotfiles/bin/kitty.completion.bash

16 lines
327 B
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
" "${COMP_WORDS[@]: 0:$limit}" | kitty +complete bash)
if [[ $? == 0 ]]; then
eval ${src}
fi
}
complete -o nospace -F _kitty_completions kitty