mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
fish: completion for edit-in-kitty clone-in-kitty
fish's wrapping facility does not preserve argv[0] so it cannot be used unlike for zsh and bash
This commit is contained in:
parent
af5e3e0c18
commit
48bb43a2c4
2 changed files with 16 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
function __ksi_completions
|
||||
set --local ct (commandline --current-token)
|
||||
set --local tokens (commandline --tokenize --cut-at-cursor --current-process)
|
||||
set tokens[1] "clone-in-kitty"
|
||||
printf "%s\n" $tokens $ct | command kitty +complete fish2
|
||||
end
|
||||
|
||||
complete -f -c clone-in-kitty -a "(__ksi_completions)"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
function __ksi_completions
|
||||
set --local ct (commandline --current-token)
|
||||
set --local tokens (commandline --tokenize --cut-at-cursor --current-process)
|
||||
set tokens[1] "edit-in-kitty"
|
||||
printf "%s\n" $tokens $ct | command kitty +complete fish2
|
||||
end
|
||||
|
||||
complete -f -c edit-in-kitty -a "(__ksi_completions)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue