Skip to content

Commit 7520c00

Browse files
committed
fix(_comp_count_args): ignore empty $3
1 parent 3539d18 commit 7520c00

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
@@ -2193,7 +2193,7 @@ _comp_count_args()
21932193
ret=1
21942194
for ((i = 1; i < cword; i++)); do
21952195
# shellcheck disable=SC2053
2196-
if [[ (${words[i]} != -?* || ${words[i]} == ${3-}) &&
2196+
if [[ (${words[i]} != -?* || ${3-} && ${words[i]} == ${3-}) &&
21972197
${words[i - 1]} != ${2-} ]]; then
21982198
((ret++))
21992199
elif [[ ${words[i]} == -- ]]; then

0 commit comments

Comments
 (0)