mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
Restore directory completions for subcommands
Fixes #6798 This re-adds some false positives: functions, builtins and abbreviations are suggested after commands like sudo but I don't think anyone had complained about that.
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
function __fish_complete_external_command
|
function __fish_complete_external_command
|
||||||
command find $PATH/ -maxdepth 1 -perm -u+x 2>&- | string match -r '[^/]*$'
|
complete -C "$argv[1]"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin
|
|||||||
end
|
end
|
||||||
|
|
||||||
if test $allow_functions_and_builtins = false && test (count $subcommand) -eq 1
|
if test $allow_functions_and_builtins = false && test (count $subcommand) -eq 1
|
||||||
__fish_complete_external_command
|
__fish_complete_external_command "$subcommand"
|
||||||
else
|
else
|
||||||
printf "%s\n" (complete -C "$subcommand")
|
printf "%s\n" (complete -C "$subcommand")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user