Merge branch 'vs/completion-with-set-u'

Effort to make the command line completion (in contrib/) safe with
"set -u" continues.

* vs/completion-with-set-u:
  completion: avoid aliased command lookup error in nounset mode
This commit is contained in:
Junio C Hamano 2021-04-30 13:50:27 +09:00
commit 5980e0d442

View File

@ -1129,7 +1129,7 @@ __git_pretty_aliases ()
# __git_aliased_command requires 1 argument
__git_aliased_command ()
{
local cur=$1 last list word cmdline
local cur=$1 last list= word cmdline
while [[ -n "$cur" ]]; do
if [[ "$list" == *" $cur "* ]]; then