path: root/sh/shrc
diff options
authorTom Ryder <tom@sanctum.geek.nz>2019-01-01 01:11:08 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-01-01 01:11:08 +1300
commite19bb8fb3c8350bee288327abd978a59eb3dc0f7 (patch)
tree754d2d883b27477f53f0fece44ef9edc7e4238f0 /sh/shrc
parente103c90d1eecafc2b46c26e52d669a0593a16a97 (diff)
parentd7b70487ecddd2b31ec0aa42ba425942a0c0d071 (diff)
downloaddotfiles-954586e6ed7dfbd525e6ec8d1adc4f0c0bc0a48e.tar.gz (sig)
Merge branch 'release/v4.3.0'v4.3.0
* release/v4.3.0: Bump VERSION Switch to using GNU Emacs on development machines Trim some trailing whitespace Clarify control flow in shell scripts Add clarifying comment Translate a short-circuit into a conditional Add a cheeky error message to sd() Strip trailing slashes from sd() target Correct error message from sd()
Diffstat (limited to 'sh/shrc')
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/shrc b/sh/shrc
index 808e944d..26f69c0c 100644
--- a/sh/shrc
+++ b/sh/shrc
@@ -8,13 +8,15 @@ command -p stty -ixon -ctlecho 2>/dev/null
HISTSIZE=$((1 << 12))
# If HOSTNAME isn't set by this shell, we'll do it
-[ -n "$HOSTNAME" ] || HOSTNAME=$(uname -n)
+if [ -z "$HOSTNAME" ] ; then
+ HOSTNAME=$(uname -n)
# Don't warn me about new mail
unset -v MAILCHECK
# Load all the POSIX-compatible functions from ~/.shrc.d; more advanced shells
-# like bash will have their own functions
+# like bash will have their own functions in addition to these
for sh in "$HOME"/.shrc.d/*.sh ; do
[ -e "$sh" ] || continue
. "$sh"