diff --git a/shtab/__init__.py b/shtab/__init__.py index 04fb421..1fc16ac 100644 --- a/shtab/__init__.py +++ b/shtab/__init__.py @@ -384,8 +384,8 @@ def complete_bash(parser, root_prefix=None, preamble="", choice_functions=None): local completing_word="${COMP_WORDS[COMP_CWORD]}" COMPREPLY=() - prefix=${root_prefix} - word_index=0 + local prefix=${root_prefix} + local word_index=0 _set_parser_defaults word_index=1