mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
completions/git: restore forward-compatibility by using "complete -c"
After a fish installation is upgraded to 3.2.0, active shells could throw an error attempting to load Git completions. It's just a transient error but also easily avoidable by using the old style. See #7822
This commit is contained in:
parent
f95f12f5e7
commit
582675c96a
2 changed files with 4 additions and 4 deletions
|
@ -1923,8 +1923,8 @@ for file in $PATH/git-*
|
|||
and continue
|
||||
|
||||
complete -C "git-$subcommand " >/dev/null
|
||||
if [ (complete git-$subcommand | count) -gt 0 ]
|
||||
complete git -f -n "__fish_git_using_command $subcommand" -a "(__fish_git_complete_custom_command $subcommand)"
|
||||
if [ (complete -c git-$subcommand | count) -gt 0 ]
|
||||
complete -c git -f -n "__fish_git_using_command $subcommand" -a "(__fish_git_complete_custom_command $subcommand)"
|
||||
end
|
||||
set -a __fish_git_custom_commands_completion $subcommand
|
||||
end
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
complete source -k -xa '(__fish_complete_suffix .fish)'
|
||||
complete source -s h -l help -d 'Display help and exit'
|
||||
complete -c source -k -xa '(__fish_complete_suffix .fish)'
|
||||
complete -c source -s h -l help -d 'Display help and exit'
|
||||
|
|
Loading…
Reference in a new issue