Skip to content

Commit

Permalink
Merge branch 'vs/completion-with-set-u'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gitster committed Apr 30, 2021
2 parents bf0d4c8 + 76655e8 commit 5980e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5980e0d

Please sign in to comment.