From 31bd3ac2e6eec954eb8b2d429a4bd58a089964e7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 01:34:03 +1300 Subject: Use more idiomatic short-circuit for -r in bashrc --- bash/bashrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bash/bashrc b/bash/bashrc index dcf3df53..3b4c91bd 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -6,9 +6,7 @@ esac # Don't do anything if restricted, not even sourcing the ENV file # Testing $- for "r" doesn't work -if shopt -q restricted_shell >/dev/null 2>&1 ; then - return -fi +! shopt -q restricted_shell >/dev/null 2>&1 || return # Clear away all aliases; we do this here rather than in the $ENV file shared # between POSIX shells, because ksh relies on aliases to implement certain -- cgit v1.2.3