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
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
[[ -z "$PS1" ]] && return
|
||||
|
||||
# Environment variables go here
|
||||
export LANG=en_US.UTF-8
|
||||
|
@ -31,7 +31,7 @@ shopt -s extglob
|
|||
shopt -s checkwinsize
|
||||
|
||||
# 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
|
||||
if [[ "$TERM" = "dumb" ]]; then
|
||||
|
@ -51,7 +51,7 @@ else
|
|||
fi
|
||||
|
||||
# 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
|
||||
eval "$(dircolors -b ~/.dircolors)"
|
||||
else
|
||||
|
@ -73,7 +73,7 @@ alias ..='cd ..'
|
|||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# 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
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue