aboutsummaryrefslogtreecommitdiff
path: root/sh/shinit
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
commit6e8c6c521ae5d60427634be01b82fe61a79f192b (patch)
tree5349fc3e9838c69dbb6fd69f0234ea921ea446ea /sh/shinit
parentFactor out zsh ENV hack into one file (diff)
downloaddotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.tar.gz
dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.zip
Refactor some conditionals
Diffstat (limited to 'sh/shinit')
-rw-r--r--sh/shinit9
1 files changed, 6 insertions, 3 deletions
diff --git a/sh/shinit b/sh/shinit
index fe770a70..fb72cd14 100644
--- a/sh/shinit
+++ b/sh/shinit
@@ -1,4 +1,7 @@
-# If the shell is interactive, source ~/.shrc
-case $- in *i*)
- [ -f "$HOME"/.shrc ] && . "$HOME"/.shrc ;;
+# If the shell is interactive, and ~/.shrc exists, source it
+case $- in
+ *i*)
+ if [ -f "$HOME"/.shrc ] ; then
+ . "$HOME"/.shrc
+ fi
esac