image-tools icon indicating copy to clipboard operation
image-tools copied to clipboard

Fix invalid variable name in bash completion script

Open kevinoid opened this issue 4 years ago • 0 comments

Sourcing completions/bash/oci-image-tool in bash produces:

bash: __oci-image-tool_previous_extglob_setting=shopt: command not found
bash: eval: -i: invalid option
eval: usage: eval [arg ...]

This occurs because __oci-image-tool_previous_extglob_setting is not a valid variable name (see https://unix.stackexchange.com/q/23659).

Fix the variable name by replacing - with _. Since the variable is unset before the script finishes, this presents minimal compatibility risk.

Thanks for considering, Kevin

kevinoid avatar Mar 13 '21 18:03 kevinoid