Skip to content

Commit 4099c8a

Browse files
committed
fix(_comp_count_args): ignore empty $3
1 parent 9378653 commit 4099c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,7 @@ _comp_count_args()
21922192
ret=1
21932193
for ((i = 1; i < cword; i++)); do
21942194
# shellcheck disable=SC2053
2195-
if [[ (${words[i]} != -?* || ${words[i]} == ${3-}) &&
2195+
if [[ (${words[i]} != -?* || ${3-} && ${words[i]} == ${3-}) &&
21962196
${words[i - 1]} != ${2-} ]]; then
21972197
((ret++))
21982198
elif [[ ${words[i]} == -- ]]; then

0 commit comments

Comments
 (0)