mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00: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. (cherry picked from commit 2a89873e6d686fcff1d26d0914a8b9f90b7cc308)
This commit is contained in:
parent
31d6ccfd59
commit
d4462912e6
3 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ This is a bug fix release containing important fixes since 3.1.0. It
|
|||
- fixes 256 colors when $TERM starts with xterm, does not include "256color" and $TERM_PROGRAM is not set, as a workaround for old Terminal.app that was misapplied (#6701).
|
||||
- fixes error spew in the hg prompt when the working directory doesn't exist anymore (#6699)
|
||||
- fixes hosts with multiple aliases in the ssh config (#6698).
|
||||
- fixes subcommand tab completion for commands like "watch" where executables that are not in $PATH were not suggested (#6798).
|
||||
- improves compatibility with macOS code signing
|
||||
- improves the `flatpak` (#6581) and `kill` (#6636) completions
|
||||
- plus some typo and link fixes and minor adjustments to the documentation (#6627, #6642, #6646, #6647, #6657)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function __fish_complete_external_command
|
||||
command find $PATH/ -maxdepth 1 -perm -u+x 2>&- | string match -r '[^/]*$'
|
||||
complete -C "$argv[1]"
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin
|
|||
end
|
||||
|
||||
if test $allow_functions_and_builtins = false && test (count $subcommand) -eq 1
|
||||
__fish_complete_external_command
|
||||
__fish_complete_external_command "$subcommand"
|
||||
else
|
||||
printf "%s\n" (complete -C "$subcommand")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue