diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-31 13:52:25 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-31 13:52:25 +1300 |
commit | 5c942c0f64847bf0d6f85c4513ab94de902e0f14 (patch) | |
tree | 262ad1285a7be855e645ad9fb8c055e625009d44 | |
parent | Add a cheeky error message to sd() (diff) | |
download | dotfiles-5c942c0f64847bf0d6f85c4513ab94de902e0f14.tar.gz dotfiles-5c942c0f64847bf0d6f85c4513ab94de902e0f14.zip |
Translate a short-circuit into a conditional
I only want to use the `||` short-circuits for control flow changes
(return, continue, break etc).
-rw-r--r-- | sh/shrc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -8,7 +8,9 @@ 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) +fi # Don't warn me about new mail unset -v MAILCHECK |