From 795e618864ab3391bba441c8cc19657c7078a758 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Mon, 12 Sep 2022 20:58:23 +0200 Subject: [PATCH] completions/git: Check for stash separately This cuts down `__fish_git_using_command` calls from 75 to 68, saving some time in the common case. (it would be possible to remove the check from `__fish_git_stash_using_command` now, but that's brittle and it's one call, so it's not a big issue) --- share/completions/git.fish | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index 660009980..3ac39750d 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -2069,15 +2069,15 @@ complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_u complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a branch -d 'Create a new branch from a stash' complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a push -d 'Create a new stash with given files' -complete -f -c git -n '__fish_git_stash_using_command apply' -a '(__fish_git_complete_stashes)' -complete -f -c git -n '__fish_git_stash_using_command branch' -a '(__fish_git_complete_stashes)' -complete -f -c git -n '__fish_git_stash_using_command drop' -a '(__fish_git_complete_stashes)' -complete -f -c git -n '__fish_git_stash_using_command pop' -a '(__fish_git_complete_stashes)' -complete -f -c git -n '__fish_git_stash_using_command show' -a '(__fish_git_complete_stashes)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command apply' -a '(__fish_git_complete_stashes)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command branch' -a '(__fish_git_complete_stashes)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command drop' -a '(__fish_git_complete_stashes)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command pop' -a '(__fish_git_complete_stashes)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command show' -a '(__fish_git_complete_stashes)' -complete -f -c git -n '__fish_git_stash_using_command push' -a '(__fish_git_files modified deleted modified-staged-deleted)' -complete -f -c git -n '__fish_git_stash_using_command push' -s p -l patch -d 'Interactively select hunks' -complete -f -c git -n '__fish_git_stash_using_command push' -s m -l message -d 'Add a description' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -a '(__fish_git_files modified deleted modified-staged-deleted)' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s p -l patch -d 'Interactively select hunks' +complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s m -l message -d 'Add a description' ### config complete -f -c git -n __fish_git_needs_command -a config -d 'Set and read git configuration variables'