Skip to content

Commit

Permalink
fix(_comp_count_args): ignore empty $3
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Sep 1, 2023
1 parent 503e3a9 commit 76eea74
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 @@ -2193,7 +2193,7 @@ _comp_count_args()
ret=1
for ((i = 1; i < cword; i++)); do
# shellcheck disable=SC2053
if [[ (${words[i]} != -?* || ${words[i]} == ${3-}) &&
if [[ (${words[i]} != -?* || ${3-} && ${words[i]} == ${3-}) &&
${words[i - 1]} != ${2-} ]]; then
((ret++))
elif [[ ${words[i]} == -- ]]; then
Expand Down

0 comments on commit 76eea74

Please sign in to comment.