Skip to content

Commit

Permalink
_init_completion: Handle cword < 0 (LP: #1289597)
Browse files Browse the repository at this point in the history
Previously only bash 4.3 seemed to provoke this, but now with the
empty command consistency tweak it occurs with earlier as well.
  • Loading branch information
warsaw authored and scop committed Sep 17, 2014
1 parent 7394d74 commit a9c556c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ _init_completion()
fi
done

[[ $cword -eq 0 ]] && return 1
[[ $cword -le 0 ]] && return 1
prev=${words[cword-1]}

[[ ${split-} ]] && _split_longopt && split=true
Expand Down

0 comments on commit a9c556c

Please sign in to comment.