lib/appearance: `shellcheck` && `shfmt`

pull/1904/head
John D Pell 2021-09-20 14:01:27 -07:00
parent 437fd2a928
commit 08217d74bc
2 changed files with 12 additions and 12 deletions

View File

@ -77,6 +77,7 @@ completion/available/vuejs.completion.bash
completion/available/wpscan.completion.bash
# libraries
lib/appearance.bash
lib/helpers.bash
lib/log.bash
lib/search.bash

View File

@ -1,19 +1,18 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC1090
# colored ls
export LSCOLORS='Gxfxcxdxdxegedabagacad'
if [[ -z "$CUSTOM_THEME_DIR" ]]; then
CUSTOM_THEME_DIR="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"
fi
: "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"}"
# Load the theme
if [[ $BASH_IT_THEME ]]; then
if [[ -f $BASH_IT_THEME ]]; then
source $BASH_IT_THEME
elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
else
source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
fi
if [[ -n "${BASH_IT_THEME:-}" ]]; then
if [[ -f "${BASH_IT_THEME}" ]]; then
source "${BASH_IT_THEME}"
elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
else
source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
fi
fi