mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
17 lines
444 B
Fish
17 lines
444 B
Fish
function __fish_complete_path --description "Complete using path"
|
|
set -l target
|
|
set -l description
|
|
switch (count $argv)
|
|
case 0
|
|
# pass
|
|
case 1
|
|
set target "$argv[1]"
|
|
case 2 "*"
|
|
set target "$argv[1]"
|
|
set description "$argv[2]"
|
|
end
|
|
set -l targets "$target"*
|
|
if set -q targets[1]
|
|
printf "%s\t$description\n" (command ls -dp $targets)
|
|
end
|
|
end
|