-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters