From f5ed4cd090b321064039441e40fe46a6995abf9a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 31 Jul 2013 17:26:30 +1200 Subject: 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 --- bash/bashrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bash/bashrc') 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 -- cgit v1.2.3