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: unbound variables in bash completion #1321

Merged

Commits on Feb 19, 2021

  1. fix: unbound variables in bash completion

    when `set -o nounset` in Bash,
    the warnings of unbound variables will break the bash completion.
    
    use `kubectl` as example:
    
    ```sh
    $ set -o nounset
    $ my-cli <Tab>-bash: BASH_COMP_DEBUG_FILE: unbound variable
    $
    ```
    
    the warning break bash completion without any completion result,
    and cause my cursor move to the newline.
    
    Use `${variable:-}` substitution in Bash,
    that assign an empty string as default for unbound variables to fix the warnings.
    edentsai committed Feb 19, 2021
    Copy the full SHA
    72f71f5 View commit details
    Browse the repository at this point in the history