mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Hook up kitty-tool completions with shell integration
This commit is contained in:
parent
74b1cac344
commit
8f5302a650
3 changed files with 9 additions and 0 deletions
|
|
@ -223,6 +223,7 @@ _ksi_main() {
|
|||
builtin complete -F _ksi_completions kitty
|
||||
builtin complete -F _ksi_completions edit-in-kitty
|
||||
builtin complete -F _ksi_completions clone-in-kitty
|
||||
builtin complete -F _ksi_completions kitty-tool
|
||||
fi
|
||||
|
||||
# wrap our prompt additions in markers we can use to remove them using
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
function __ksi_completions
|
||||
set --local ct (commandline --current-token)
|
||||
set --local tokens (commandline --tokenize --cut-at-cursor --current-process)
|
||||
printf "%s\n" $tokens $ct | command kitty-tool __complete__ fish
|
||||
end
|
||||
|
||||
complete -f -c kitty-tool -a "(__ksi_completions)"
|
||||
|
|
@ -108,6 +108,7 @@ _ksi_deferred_init() {
|
|||
compdef _kitty kitty
|
||||
compdef _kitty edit-in-kitty
|
||||
compdef _kitty clone-in-kitty
|
||||
compdef _kitty kitty-tool
|
||||
fi
|
||||
|
||||
# If compdef is not set, compinit has not run yet. In this case we must
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue