mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 18:55:06 +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 (cherry picked from commit 4a8ebc07447cc0432641012ffa542d5aafa45d64)
This commit is contained in:
parent
61b87f585d
commit
308e0ceb9d
@ -10,8 +10,8 @@ function __fish_complete_path --description "Complete using path"
|
||||
set target "$argv[1]"
|
||||
set description "$argv[2]"
|
||||
end
|
||||
set -l targets "$target"*
|
||||
set -l targets (complete -C"'' $target")
|
||||
if set -q targets[1]
|
||||
printf "%s\t$description\n" (command ls -dp $targets)
|
||||
printf "%s\n" $targets\t"$description"
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user