aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-21 13:09:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-21 13:09:10 +1200
commitf7e851d9986a30e3d590d67b23e862a38d427472 (patch)
tree54725167ae5b729071f944e41fdc8ed753cf2283 /sh/profile.d
parentMerge branch 'freebsd' (diff)
downloaddotfiles-f7e851d9986a30e3d590d67b23e862a38d427472.tar.gz
dotfiles-f7e851d9986a30e3d590d67b23e862a38d427472.zip
Clean up/extend grep()/ls() extension
Diffstat (limited to 'sh/profile.d')
-rw-r--r--sh/profile.d/grep.sh2
-rw-r--r--sh/profile.d/ls.sh12
2 files changed, 10 insertions, 4 deletions
diff --git a/sh/profile.d/grep.sh b/sh/profile.d/grep.sh
index d1ef3ba1..d6f9c36b 100644
--- a/sh/profile.d/grep.sh
+++ b/sh/profile.d/grep.sh
@@ -20,7 +20,7 @@
exclude \
exclude-dir
for opt ; do
- grep -Eq -- --"$opt" "$gcd"/help || continue
+ grep -q -- --"$opt" "$gcd"/help || continue
touch -- "$gcd"/"$opt" || exit
done
fi
diff --git a/sh/profile.d/ls.sh b/sh/profile.d/ls.sh
index 0c3754e9..8a255bee 100644
--- a/sh/profile.d/ls.sh
+++ b/sh/profile.d/ls.sh
@@ -13,8 +13,14 @@
# Iterate through some useful options and create files to show they're
# available
- if grep -q -- --color "$lcd"/help ; then
- touch -- "$lcd"/color || exit
- fi
+ set -- block-size \
+ classify \
+ color \
+ human-readable \
+ time-style
+ for opt ; do
+ grep -q -- --"$opt" "$lcd"/help || continue
+ touch -- "$lcd"/"$opt" || exit
+ done
fi
)