Skip to content

Commit

Permalink
Add the default values properly to ensure they are substituted properly
Browse files Browse the repository at this point in the history
if overwritten
  • Loading branch information
jonmosco committed Jan 8, 2018
1 parent 1e2e418 commit 247ad97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ run `kubeoff`. You can enable it again by running `kubeon`.
## Customization

The default settings can be overridden in `~/.bashrc` or `~/.zshrc` by setting
the following environment variables after sourcing kube-ps1.sh:
the following environment variables:

| Variable | Default | Meaning |
| :------- | :-----: | ------- |
Expand Down
9 changes: 4 additions & 5 deletions kube-ps1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

# Default values for the prompt
# Override these values in ~/.zshrc or ~/.bashrc
# after sourcing this file
KUBE_PS1_BINARY_DEFAULT="${KUBE_PS1_DEFAULT:-true}"
KUBE_PS1_BINARY="${KUBE_PS1_BINARY:-"kubectl"}"
KUBE_PS1_DISABLE_PATH="${HOME}/.kube/kube-ps1/disabled"
Expand All @@ -32,10 +31,10 @@ KUBE_PS1_LABEL_ENABLE="${KUBE_PS1_LABEL_ENABLE:-true}"
KUBE_PS1_LABEL_DEFAULT="${KUBE_PS1_LABEL_DEFAULT:-""}"
KUBE_PS1_LABEL_USE_IMG="${KUBE_PS1_LABEL_USE_IMG:-false}"
KUBE_PS1_LAST_TIME=0
KUBE_PS1_PREFIX="("
KUBE_PS1_SEPARATOR="|"
KUBE_PS1_DIVIDER=":"
KUBE_PS1_SUFFIX=")"
KUBE_PS1_PREFIX="${KUBE_PS1_PREFIX:-"("}"
KUBE_PS1_SEPARATOR="${KUBE_PS1_SEPARATOR:-"|"}"
KUBE_PS1_DIVIDER="${KUBE_PS1_DIVIDER:-":"}"
KUBE_PS1_SUFFIX="${KUBE_PS1_SUFFIX:-")"}"

if [ "${ZSH_VERSION}" ]; then
KUBE_PS1_SHELL="zsh"
Expand Down

0 comments on commit 247ad97

Please sign in to comment.