diff --git a/share/completions/kitty.fish b/share/completions/kitty.fish index 8f26b2165..7734d975f 100644 --- a/share/completions/kitty.fish +++ b/share/completions/kitty.fish @@ -1,6 +1,7 @@ -function __kitty_completions - # Send all words up to the one before the cursor - commandline -cop | kitty +complete fish +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 +complete fish2 end -complete -f -c kitty -a "(__kitty_completions)" +complete -f -c kitty -a "(__ksi_completions)"