fix: interactive completion for fish
This commit is contained in:
parent
6b2c6a2bc3
commit
57ff30d7af
|
|
@ -72,7 +72,12 @@ function __zoxide_z
|
|||
else if test $argc -eq 1 -a -d $argv[1]
|
||||
__zoxide_cd $argv[1]
|
||||
else
|
||||
set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv)
|
||||
if string match '*#*' $argv &>/dev/null
|
||||
set target (string match '*#*' $argv | string replace \# '')
|
||||
else
|
||||
set target $argv
|
||||
end
|
||||
set -l result (command zoxide query --exclude (__zoxide_pwd) -- $target)
|
||||
and __zoxide_cd $result
|
||||
end
|
||||
end
|
||||
|
|
@ -89,7 +94,7 @@ function __zoxide_z_complete
|
|||
# If the last argument is empty, use interactive selection.
|
||||
set -l query $tokens[2..-1]
|
||||
set -l result (zoxide query -i -- $query)
|
||||
and commandline --current-process "$tokens[1] "(string escape $result)
|
||||
and echo \#(string escape $result)
|
||||
commandline --function repaint
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue