From a2b5f3e2c173284a85401794697ba6925c74b30c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 30 Nov 2018 14:07:45 +1300 Subject: 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. --- bash/bash_logout | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bash/bash_logout') 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 -- cgit v1.2.3