Move the completion function to the autocomplete script. Fix some issues with cursor shape setting, respect user configuration. Functions and vars start with two underscores, following the convention. Other minor refactoring.
8 lines
271 B
Fish
8 lines
271 B
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 "(__ksi_completions)"
|