Skip to content

Commit 1d7a36b

Browse files
authored
Merge pull request #184 from scop/fix/bash-optional-nargs-question
Fix bash error on optional nargs="?"
2 parents b83be05 + a04ddf9 commit 1d7a36b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shtab/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ def complete_bash(parser, root_prefix=None, preamble="", choice_functions=None):
421421
422422
if [[ "$current_action_nargs" != "*" ]] && \\
423423
[[ "$current_action_nargs" != "+" ]] && \\
424+
[[ "$current_action_nargs" != "?" ]] && \\
424425
[[ "$current_action_nargs" != *"..." ]] && \\
425426
(( $word_index + 1 - $current_action_args_start_index - $pos_only >= \\
426427
$current_action_nargs )); then

0 commit comments

Comments
 (0)