Skip to content

Commit

Permalink
lib/theme: Fix a *few* SC2154
Browse files Browse the repository at this point in the history
These variables are referenced by themes already linted.
  • Loading branch information
gaelicWizard committed Sep 19, 2021
1 parent af0f1ff commit 3fd1c02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions themes/base.theme.bash
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function rbenv_version_prompt {
}

function rbfu_version_prompt {
if [[ $RBFU_RUBY_VERSION ]]; then
if [[ -n "${RBFU_RUBY_VERSION:-}" ]]; then
echo -e "${RBFU_THEME_PROMPT_PREFIX}${RBFU_RUBY_VERSION}${RBFU_THEME_PROMPT_SUFFIX}"
fi
}
Expand Down Expand Up @@ -462,8 +462,8 @@ function k8s_namespace_prompt {
}

function virtualenv_prompt {
if [[ -n "$VIRTUAL_ENV" ]]; then
virtualenv=$(basename "$VIRTUAL_ENV")
if [[ -n "${VIRTUAL_ENV:-}" ]]; then
virtualenv="${VIRTUAL_ENV##*/}"
echo -e "$VIRTUALENV_THEME_PROMPT_PREFIX$virtualenv$VIRTUALENV_THEME_PROMPT_SUFFIX"
fi
}
Expand Down Expand Up @@ -504,7 +504,7 @@ function clock_char {
function clock_prompt {
CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$normal"}
CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H:%M:%S"}
[ -z "$THEME_SHOW_CLOCK" ] && THEME_SHOW_CLOCK=${THEME_CLOCK_CHECK:-"true"}
[[ -z "${THEME_SHOW_CLOCK:-}" ]] && THEME_SHOW_CLOCK=${THEME_CLOCK_CHECK:-"true"}
SHOW_CLOCK=$THEME_SHOW_CLOCK

if [[ "${SHOW_CLOCK}" = "true" ]]; then
Expand Down

0 comments on commit 3fd1c02

Please sign in to comment.