Re: [PATCH v2 2/5] Completion: extract common stash listing code
"D. Ben Knoble" <ben.knoble@gmail.com> writes:
Show 18 quoted lines
> 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>
> ---
> contrib/completion/git-completion.bash | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
> @@ -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
> ...
> - __gitcomp_nl "$(__git stash list \
> - | sed -n -e 's/:.*//p')"
> + __git_complete_stashes
Nice to see two of these unsightly constructs go ;-)