From 8eb133b6d242875857f9e88302534274d71ae662 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 15 Apr 2014 14:05:55 +0200 Subject: find: match without regards to case --- src/password-store.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2