aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-07-31 17:26:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-07-31 17:26:30 +1200
commitf5ed4cd090b321064039441e40fe46a6995abf9a (patch)
tree371166922ae8e079eca565322496068d658b00ba /bash/bashrc
parentPlace missing quotes (diff)
downloaddotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.tar.gz
dotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.zip
Use standard structure for if/for in shell
Mostly for clarity reasons; using this syntax: if [ condition ]; then commands fi As opposed to: if [ condition ] then commands fi Or: [ condition ] && command
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc14
1 files changed, 8 insertions, 6 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 5e37d3f4..280a47ca 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -1,5 +1,7 @@
# Don't do anything if not running interactively
-[[ -z "$PS1" ]] && return
+if [[ -z "$PS1" ]]; then
+ return
+fi
# Keep plenty of history
HISTFILESIZE=1000000
@@ -21,13 +23,13 @@ setterm -bfreq 0 &>/dev/null
stty -ixon &>/dev/null
# Use completion, if available
-[[ -r /etc/bash_completion ]] && source /etc/bash_completion
+if [[ -r /etc/bash_completion ]]; then
+ source /etc/bash_completion
+fi
# Load any supplementary scripts
-if [[ -d "$HOME/.bashrc.d" ]]
-then
- for file in $HOME/.bashrc.d/*
- do
+if [[ -d "$HOME/.bashrc.d" ]]; then
+ for file in $HOME/.bashrc.d/*; do
source $file
done
fi