completion: extract common stash listing code
With no change in behavior, prepare to adjust how stashes are completed by centralizing candidate generation. Signed-off-by: D. Ben Knoble <ben.knoble@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>seen
parent
43f61f9f67
commit
4ee00faa9d
|
|
@ -3593,20 +3593,23 @@ _git_stash ()
|
|||
if [ $cword -eq $((__git_cmd_idx+2)) ]; then
|
||||
__git_complete_refs
|
||||
else
|
||||
__gitcomp_nl "$(__git stash list \
|
||||
| sed -n -e 's/:.*//p')"
|
||||
__git_complete_stashes
|
||||
fi
|
||||
;;
|
||||
import,*)
|
||||
__git_complete_refs
|
||||
;;
|
||||
show,*|apply,*|drop,*|pop,*|export,*)
|
||||
__gitcomp_nl "$(__git stash list \
|
||||
| sed -n -e 's/:.*//p')"
|
||||
__git_complete_stashes
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git_complete_stashes ()
|
||||
{
|
||||
__gitcomp_nl "$(__git stash list | sed -n -e 's/:.*//p')"
|
||||
}
|
||||
|
||||
_git_submodule ()
|
||||
{
|
||||
__git_has_doubledash && return
|
||||
|
|
|
|||
Loading…
Reference in New Issue