Skip to content

Commit

Permalink
fix iterative#74 again
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 29, 2022
1 parent cb81d71 commit 9bfda44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shtab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,11 @@ def complete_bash(parser, root_prefix=None, preamble="", choice_functions=None):
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
else
# use choices & compgen
COMPREPLY=( $(compgen -W "${current_action_choices[*]}" -- "${completing_word}") \\
$([ -n "${current_action_compgen}" ] \\
local IFS=$'\\n' # items may contain spaces, so delimit using newline
COMPREPLY=( $([ -n "${current_action_compgen}" ] \\
&& "${current_action_compgen}" "${completing_word}") )
unset IFS
COMPREPLY+=( $(compgen -W "${current_action_choices[*]}" -- "${completing_word}") )
fi
return 0
Expand Down

0 comments on commit 9bfda44

Please sign in to comment.