Merge pull request #2028 from gaelicWizard/plugin/base
lib/appearance: export `$CLICOLOR` instead of `$LSCOLOR`pull/2033/merge
commit
49649c5f0c
|
|
@ -76,6 +76,7 @@ completion/available/vuejs.completion.bash
|
||||||
completion/available/wpscan.completion.bash
|
completion/available/wpscan.completion.bash
|
||||||
|
|
||||||
# libraries
|
# libraries
|
||||||
|
lib/appearance.bash
|
||||||
lib/colors.bash
|
lib/colors.bash
|
||||||
lib/helpers.bash
|
lib/helpers.bash
|
||||||
lib/history.bash
|
lib/history.bash
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# colored ls
|
: "${CLICOLOR:=$(tput colors)}"
|
||||||
export LSCOLORS='Gxfxcxdxdxegedabagacad'
|
export CLICOLOR
|
||||||
|
|
||||||
if [[ -z "$CUSTOM_THEME_DIR" ]]; then
|
: "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"}"
|
||||||
CUSTOM_THEME_DIR="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load the theme
|
# Load the theme
|
||||||
if [[ $BASH_IT_THEME ]]; then
|
# shellcheck disable=SC1090
|
||||||
if [[ -f $BASH_IT_THEME ]]; then
|
if [[ -n "${BASH_IT_THEME:-}" ]]; then
|
||||||
source $BASH_IT_THEME
|
if [[ -f "${BASH_IT_THEME}" ]]; then
|
||||||
|
source "${BASH_IT_THEME}"
|
||||||
elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
|
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"
|
source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ function _bash-it-log-prefix-by-path() {
|
||||||
|
|
||||||
function _has_colors() {
|
function _has_colors() {
|
||||||
# Check that stdout is a terminal, and that it has at least 8 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() {
|
function _bash-it-log-message() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue