bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

Make work with `localvar_inherit` set

Open scop opened this issue 2 years ago • 0 comments

When shopt -s localvar_inherit (bash 5.0) is enabled and there is a global variable mode, local mode initializes the variable mode with the value of the global mode, and thus [[ ${mode-} ]] will always success unexpectedly. I think local mode should be explicitly initialized with some value. The condition [[ ! -v mode ]] also needs to be updated.

Originally posted by @akinomyoga in https://github.com/scop/bash-completion/pull/642#discussion_r757770921

See the discussion thread there for more info and thoughts.

scop avatar Nov 29 '21 16:11 scop