m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-15 14:05:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-15 14:33:44 +0200
commit8eb133b6d242875857f9e88302534274d71ae662 (patch)
treea5de564d1bb9db29dc404749660ffd65b9ec9d4d /src
parente242e97e8162f5539fcd3175f496e27c6efd7460 (diff)
find: match without regards to case
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 706eada..d9d458a 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -275,11 +275,12 @@ case "$command" in
echo "Usage: $program $command pass-names..."
exit 1
fi
- if ! tree --help |& grep -q "^ --matchdirs"; then
+ if ! tree --version | grep -q "Jason A. Donenfeld"; then
echo "ERROR: $program: incompatible tree command"
echo
echo "Your version of the tree command is missing the relevent patch to add the"
- echo "--matchdirs switch. Please ask your distribution to patch your version of"
+ echo "--matchdirs and --caseinsensitive switches. Please ask your distribution"
+ echo "to patch your version of"
echo "tree with:"
echo " http://git.zx2c4.com/password-store/plain/contrib/tree-1.6.0-matchdirs.patch"
echo "Sorry for the inconvenience."
@@ -287,7 +288,7 @@ case "$command" in
fi
terms="$@"
echo "Search Terms: $terms"
- tree -l --noreport -P "*${terms// /*|*}*" --prune --matchdirs "$PREFIX" | tail -n +2 | sed 's/\.gpg$//'
+ tree -l --noreport -P "*${terms// /*|*}*" --prune --matchdirs --caseinsensitive "$PREFIX" | tail -n +2 | sed 's/\.gpg$//'
;;
insert)
multiline=0