mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
__fish_complete_path: Also use an empty command
This removes a weird `ls` call (that just decorates directories), and makes it behave like normal path completion. (really, this should be a proper option to complete) Fixes #9285
This commit is contained in:
parent
200095998a
commit
4a8ebc0744
|
@ -10,8 +10,8 @@ function __fish_complete_path --description "Complete using path"
|
||||||
set target "$argv[1]"
|
set target "$argv[1]"
|
||||||
set description "$argv[2]"
|
set description "$argv[2]"
|
||||||
end
|
end
|
||||||
set -l targets "$target"*
|
set -l targets (complete -C"'' $target")
|
||||||
if set -q targets[1]
|
if set -q targets[1]
|
||||||
printf "%s\t$description\n" (command ls -dp $targets)
|
printf "%s\n" $targets\t"$description"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user