Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid variable name in bash completion script #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinoid
Copy link

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

Sourcing completions/bash/oci-image-tool 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.

Signed-off-by: Kevin Locke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant