aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-29 17:22:56 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-29 17:22:56 +1200
commitf1fb2e6cd9c774e8f39ab5e8f7896585a56711c2 (patch)
tree7c32d48259a5a0c9abbced54610edde8e38bc852
parentCorrect typo in .bashrc (diff)
downloaddotfiles-f1fb2e6cd9c774e8f39ab5e8f7896585a56711c2.tar.gz
dotfiles-f1fb2e6cd9c774e8f39ab5e8f7896585a56711c2.zip
Break sh noglob guard into two lines for clarity
They're nicer to read this way.
-rw-r--r--bash/bashrc3
-rw-r--r--bash/bashrc.d/completion.bash3
-rw-r--r--bash/bashrc.d/keep.bash3
-rw-r--r--ksh/kshrc.d/keep.ksh3
-rw-r--r--sh/profile3
-rw-r--r--sh/shrc3
-rw-r--r--zsh/zshrc3
-rw-r--r--zsh/zshrc.d/keep.zsh3
8 files changed, 16 insertions, 8 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 1d5c7aed..8462e5c2 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -95,6 +95,7 @@ fi
# Load Bash-specific startup files
for sh in "$HOME"/.bashrc.d/*.bash ; do
- [[ -e $sh ]] && source "$sh"
+ [[ -e $sh ]] || continue
+ source "$sh"
done
unset -v sh
diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash
index 901c55ec..d938275c 100644
--- a/bash/bashrc.d/completion.bash
+++ b/bash/bashrc.d/completion.bash
@@ -118,7 +118,8 @@ if ((BASH_VERSINFO[0] >= 4)) ; then
# If not, load all of the completions up now
else
for sh in "$HOME"/.bash_completion.d/*.bash ; do
- [[ -e $sh ]] && source "$sh"
+ [[ -e $sh ]] || continue
+ source "$sh"
done
unset -v sh
fi
diff --git a/bash/bashrc.d/keep.bash b/bash/bashrc.d/keep.bash
index da7ff558..ab89288e 100644
--- a/bash/bashrc.d/keep.bash
+++ b/bash/bashrc.d/keep.bash
@@ -143,6 +143,7 @@ EOF
# Load any existing scripts in bashkeep
for bashkeep in "${BASHKEEP:-"$HOME"/.bashkeep.d}"/*.bash ; do
- [[ -e $bashkeep ]] && source "$bashkeep"
+ [[ -e $bashkeep ]] || continue
+ source "$bashkeep"
done
unset -v bashkeep
diff --git a/ksh/kshrc.d/keep.ksh b/ksh/kshrc.d/keep.ksh
index 0451fa68..f6593c3d 100644
--- a/ksh/kshrc.d/keep.ksh
+++ b/ksh/kshrc.d/keep.ksh
@@ -153,6 +153,7 @@ EOF
# Load any existing scripts in kshkeep
for kshkeep in "${KSHKEEP:-"$HOME"/.kshkeep.d}"/*.ksh ; do
- [[ -e $kshkeep ]] && source "$kshkeep"
+ [[ -e $kshkeep ]] || continue
+ source "$kshkeep"
done
unset -v kshkeep
diff --git a/sh/profile b/sh/profile
index dc145d85..68e803ca 100644
--- a/sh/profile
+++ b/sh/profile
@@ -3,7 +3,8 @@
# Load all supplementary scripts in ~/.profile.d
for sh in "$HOME"/.profile.d/*.sh ; do
- [ -e "$sh" ] && . "$sh"
+ [ -e "$sh" ] || continue
+ . "$sh"
done
unset -v sh
diff --git a/sh/shrc b/sh/shrc
index 63026e69..6359dbc3 100644
--- a/sh/shrc
+++ b/sh/shrc
@@ -16,7 +16,8 @@ unset -v MAILCHECK
# Load all the POSIX-compatible functions from ~/.shrc.d; more advanced shells
# like bash will have their own functions
for sh in "$HOME"/.shrc.d/*.sh ; do
- [ -e "$sh" ] && . "$sh"
+ [ -e "$sh" ] || continue
+ . "$sh"
done
unset -v sh
diff --git a/zsh/zshrc b/zsh/zshrc
index fa4186d4..2977c4d9 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -17,6 +17,7 @@ SAVEHIST=$((1 << 12))
# Load Zsh-specific startup files
for sh in "$HOME"/.zshrc.d/*.zsh ; do
- [[ -e $sh ]] && source "$sh"
+ [[ -e $sh ]] || continue
+ source "$sh"
done
unset -v sh
diff --git a/zsh/zshrc.d/keep.zsh b/zsh/zshrc.d/keep.zsh
index 8dfc5f29..59696301 100644
--- a/zsh/zshrc.d/keep.zsh
+++ b/zsh/zshrc.d/keep.zsh
@@ -142,6 +142,7 @@ EOF
# Load any existing scripts in zshkeep
for zshkeep in "${ZSHKEEP:-"$HOME"/.zshkeep.d}"/*.zsh(N) ; do
- [[ -e $zshkeep ]] && source "$zshkeep"
+ [[ -e $zshkeep ]] || continue
+ source "$zshkeep"
done
unset -v zshkeep