mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:27:28 +08:00
6ece8523b1
Completions can now be written which disable file completion and then selectively re-enable it using this function. Closes #834.
15 lines
315 B
Fish
15 lines
315 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
|
|
printf "%s\t$description\n" (command ls -dp "$target"*)
|
|
end
|