From 6e8c6c521ae5d60427634be01b82fe61a79f192b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Dec 2018 14:52:11 +1300 Subject: Refactor some conditionals --- sh/profile.d/options.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sh/profile.d/options.sh') diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh index f89967cb..58376fb3 100644 --- a/sh/profile.d/options.sh +++ b/sh/profile.d/options.sh @@ -23,8 +23,9 @@ options() { # Iterate through remaining arguments (desired options), creating files to # show they're available if found in the help output for opt do - command -p grep -q -- '[^[:alnum:]]--'"$opt"'[^[:alnum:]]' help && - touch -- "$opt" + command -p grep -q -- \ + '[^[:alnum:]]--'"$opt"'[^[:alnum:]]' help || continue + touch -- "$opt" done } -- cgit v1.2.3