diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-23 22:32:38 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-23 22:33:38 +0200 |
commit | 6cbdb2d631c82f1031b95067c30b4c5db1b98c7d (patch) | |
tree | 6abb4438ac9d055a1dafd6f40522a1f3fd532db1 /src | |
parent | 95d100938736d074a404a5f4d4ef1a38ceaab515 (diff) |
find: support tree 1.7.0
Diffstat (limited to 'src')
-rwxr-xr-x | src/password-store.sh | 16 |
1 files changed, 2 insertions, 14 deletions
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() { |