Consistently use [[ … ]] in .bashrc
This commit is contained in:
parent
e1712d710c
commit
fdf1f4e9ea
8
bashrc
8
bashrc
|
@ -3,7 +3,7 @@
|
||||||
# Based on example .bashrc as provided by Debian
|
# Based on example .bashrc as provided by Debian
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[[ -z "$PS1" ]] && return
|
||||||
|
|
||||||
# Environment variables go here
|
# Environment variables go here
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
@ -31,7 +31,7 @@ shopt -s extglob
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
# Simple prompt
|
# Simple prompt
|
||||||
if [[ "$TERM" = "dumb" ]]; then
|
if [[ "$TERM" = "dumb" ]]; then
|
||||||
|
@ -51,7 +51,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable color support of ls and also add handy aliases
|
# Enable color support of ls and also add handy aliases
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [[ -x /usr/bin/dircolors ]]; then
|
||||||
if [[ -r ~/.dircolors ]]; then
|
if [[ -r ~/.dircolors ]]; then
|
||||||
eval "$(dircolors -b ~/.dircolors)"
|
eval "$(dircolors -b ~/.dircolors)"
|
||||||
else
|
else
|
||||||
|
@ -73,7 +73,7 @@ alias ..='cd ..'
|
||||||
# enable programmable completion features (you don't need to enable
|
# enable programmable completion features (you don't need to enable
|
||||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
# sources /etc/bash.bashrc).
|
# sources /etc/bash.bashrc).
|
||||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
if [[ -f /etc/bash_completion ]] && ! shopt -oq posix; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue