aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_logout
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-30 14:07:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-30 14:07:45 +1300
commita2b5f3e2c173284a85401794697ba6925c74b30c (patch)
tree8b97c74ff1284e6794f855bda9fb76d31714248c /bash/bash_logout
parentDrop support for Bash <= 3.0 (diff)
downloaddotfiles-a2b5f3e2c173284a85401794697ba6925c74b30c.tar.gz
dotfiles-a2b5f3e2c173284a85401794697ba6925c74b30c.zip
Use ||/&& short-circuiting only for flow control
If we're doing something besides return/exit, it should be a proper `if` condition so that the semantics are clearer.
Diffstat (limited to 'bash/bash_logout')
-rw-r--r--bash/bash_logout4
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/bash_logout b/bash/bash_logout
index 911b4f66..ab3f573d 100644
--- a/bash/bash_logout
+++ b/bash/bash_logout
@@ -1,2 +1,4 @@
# Clear console if possible when logging out
-[ "$SHLVL" = 1 ] && clear_console -q 2>/dev/null
+if [ "$SHLVL" = 1 ] ; then
+ clear_console -q 2>/dev/null
+fi