From 6cbdb2d631c82f1031b95067c30b4c5db1b98c7d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 23 Apr 2014 22:32:38 +0200 Subject: find: support tree 1.7.0 --- src/password-store.sh | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/password-store.sh b/src/password-store.sh index daadac2..00a7fde 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -331,7 +331,7 @@ cmd_show() { else echo "${path%\/}" fi - tree -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//' + tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//' else echo "$path is not in the password store." exit 1 @@ -343,21 +343,9 @@ cmd_find() { echo "Usage: $PROGRAM $COMMAND pass-names..." exit 1 fi - if ! tree --version | grep -q "Jason A. Donenfeld"; then - cat <<-_EOF - Error: incompatible tree command. - - Your version of the tree command is missing the relevent patch to add the - --matchdirs and --caseinsensitive switches. Please ask your distribution - to patch your version of tree with: - http://git.zx2c4.com/password-store/plain/contrib/tree-1.6.0-matchdirs.patch - Sorry for the inconvenience. - _EOF - exit 1 - fi local terms="$@" echo "Search Terms: $terms" - tree -l --noreport -P "*${terms// /*|*}*" --prune --matchdirs --caseinsensitive "$PREFIX" | tail -n +2 | sed 's/\.gpg$//' + tree -C -l --noreport -P "*${terms// /*|*}*" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed 's/\.gpg$//' } cmd_grep() { -- cgit v1.2.3-59-g8ed1b