Skip to content

Commit

Permalink
Merge pull request #2028 from gaelicWizard/plugin/base
Browse files Browse the repository at this point in the history
lib/appearance: export `$CLICOLOR` instead of `$LSCOLOR`
  • Loading branch information
NoahGorny committed Mar 4, 2022
2 parents 6a53066 + 999b787 commit 49649c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ completion/available/vuejs.completion.bash
completion/available/wpscan.completion.bash

# libraries
lib/appearance.bash
lib/colors.bash
lib/helpers.bash
lib/history.bash
Expand Down
27 changes: 13 additions & 14 deletions lib/appearance.bash
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#!/usr/bin/env bash
# shellcheck shell=bash

# colored ls
export LSCOLORS='Gxfxcxdxdxegedabagacad'
: "${CLICOLOR:=$(tput colors)}"
export CLICOLOR

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
# shellcheck disable=SC1090
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
2 changes: 1 addition & 1 deletion lib/log.bash
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function _bash-it-log-prefix-by-path() {

function _has_colors() {
# Check that stdout is a terminal, and that it has at least 8 colors.
[[ -t 1 && "${_bash_it_available_colors:=$(tput colors 2> /dev/null)}" -ge 8 ]]
[[ -t 1 && "${CLICOLOR:=$(tput colors 2> /dev/null)}" -ge 8 ]]
}

function _bash-it-log-message() {
Expand Down

0 comments on commit 49649c5

Please sign in to comment.