Negate var test conditions
We want to know if the vars are 'not' set.
This commit is contained in:
parent
4d86eb6d78
commit
5566a41f7c
1 changed files with 12 additions and 12 deletions
|
@ -22,10 +22,10 @@ if [[ ! -z ${terminfo[colors]} ]] && (( ${terminfo[colors]} >= 8 )); then
|
||||||
# BSD
|
# BSD
|
||||||
|
|
||||||
# colours for ls and completion
|
# colours for ls and completion
|
||||||
if (( ${+LSCOLORS} )); then
|
if ! (( ${+LSCOLORS} )); then
|
||||||
export LSCOLORS='exfxcxdxbxGxDxabagacad'
|
export LSCOLORS='exfxcxdxbxGxDxabagacad'
|
||||||
fi
|
fi
|
||||||
if (( ${+LS_COLORS} )); then
|
if ! (( ${+LS_COLORS} )); then
|
||||||
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'
|
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -40,14 +40,14 @@ if [[ ! -z ${terminfo[colors]} ]] && (( ${terminfo[colors]} >= 8 )); then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# grep Colours
|
# grep Colours
|
||||||
if (( ${+GREP_COLOR} )); then
|
if ! (( ${+GREP_COLOR} )); then
|
||||||
export GREP_COLOR='37;45' #BSD
|
export GREP_COLOR='37;45' #BSD
|
||||||
fi
|
fi
|
||||||
if (( ${+GREP_COLORS} )); then
|
if ! (( ${+GREP_COLORS} )); then
|
||||||
export GREP_COLORS="mt=${GREP_COLOR}" #GNU
|
export GREP_COLORS="mt=${GREP_COLOR}" #GNU
|
||||||
fi
|
fi
|
||||||
if [[ ${OSTYPE} == openbsd* ]]; then
|
if [[ ${OSTYPE} == openbsd* ]]; then
|
||||||
if (( ${+commands[ggrep]} )); then
|
if ! (( ${+commands[ggrep]} )); then
|
||||||
alias grep='ggrep --color=auto'
|
alias grep='ggrep --color=auto'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -56,25 +56,25 @@ if [[ ! -z ${terminfo[colors]} ]] && (( ${terminfo[colors]} >= 8 )); then
|
||||||
|
|
||||||
# less Colours
|
# less Colours
|
||||||
if [[ ${PAGER} == 'less' ]]; then
|
if [[ ${PAGER} == 'less' ]]; then
|
||||||
if (( ${+LESS_TERMCAP_mb} )); then
|
if ! (( ${+LESS_TERMCAP_mb} )); then
|
||||||
export LESS_TERMCAP_mb=$'\E[1;31m' # Begins blinking.
|
export LESS_TERMCAP_mb=$'\E[1;31m' # Begins blinking.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_md} )); then
|
if ! (( ${+LESS_TERMCAP_md} )); then
|
||||||
export LESS_TERMCAP_md=$'\E[1;31m' # Begins bold.
|
export LESS_TERMCAP_md=$'\E[1;31m' # Begins bold.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_me} )); then
|
if ! (( ${+LESS_TERMCAP_me} )); then
|
||||||
export LESS_TERMCAP_me=$'\E[0m' # Ends mode.
|
export LESS_TERMCAP_me=$'\E[0m' # Ends mode.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_se} )); then
|
if ! (( ${+LESS_TERMCAP_se} )); then
|
||||||
export LESS_TERMCAP_se=$'\E[0m' # Ends standout-mode.
|
export LESS_TERMCAP_se=$'\E[0m' # Ends standout-mode.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_so} )); then
|
if ! (( ${+LESS_TERMCAP_so} )); then
|
||||||
export LESS_TERMCAP_so=$'\E[7m' # Begins standout-mode.
|
export LESS_TERMCAP_so=$'\E[7m' # Begins standout-mode.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_ue} )); then
|
if ! (( ${+LESS_TERMCAP_ue} )); then
|
||||||
export LESS_TERMCAP_ue=$'\E[0m' # Ends underline.
|
export LESS_TERMCAP_ue=$'\E[0m' # Ends underline.
|
||||||
fi
|
fi
|
||||||
if (( ${+LESS_TERMCAP_us} )); then
|
if ! (( ${+LESS_TERMCAP_us} )); then
|
||||||
export LESS_TERMCAP_us=$'\E[1;32m' # Begins underline.
|
export LESS_TERMCAP_us=$'\E[1;32m' # Begins underline.
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue