aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/options.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
commit6e8c6c521ae5d60427634be01b82fe61a79f192b (patch)
tree5349fc3e9838c69dbb6fd69f0234ea921ea446ea /sh/profile.d/options.sh
parentFactor out zsh ENV hack into one file (diff)
downloaddotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.tar.gz
dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.zip
Refactor some conditionals
Diffstat (limited to 'sh/profile.d/options.sh')
-rw-r--r--sh/profile.d/options.sh5
1 files changed, 3 insertions, 2 deletions
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
}