diff options
author | rhatto@riseup.net <Silvio Rhatto> | 2014-04-17 17:55:22 -0300 |
---|---|---|
committer | rhatto@riseup.net <Silvio Rhatto> | 2014-04-17 17:55:22 -0300 |
commit | 4759a178831bf003e2c962928be11db30feb8795 (patch) | |
tree | bd98ea49b6d041ec4e1f02983e2d4ddc920f9701 /lib | |
parent | 7aa135d606c036ab41d1671b484bb80c11b0442f (diff) | |
download | keyringer-4759a178831bf003e2c962928be11db30feb8795.tar.gz keyringer-4759a178831bf003e2c962928be11db30feb8795.tar.bz2 |
Rollback: use find+grep instead of 'find -iname' (#53)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/keyringer/actions/find | 2 | ||||
-rwxr-xr-x | lib/keyringer/functions | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/keyringer/actions/find b/lib/keyringer/actions/find index 21afc7a..9b18d66 100755 --- a/lib/keyringer/actions/find +++ b/lib/keyringer/actions/find @@ -15,5 +15,5 @@ shift ARGS="`echo "$*" | sed -e "s|^/*||"`" # Run find command -cd "$KEYDIR/$RELATIVE_PATH" && find -iname "*$ARGS*" | sed -e 's|^./||g' +cd "$KEYDIR/$RELATIVE_PATH" && find | grep -i "$ARGS" | sed -e 's|^./||g' cd "$CWD" diff --git a/lib/keyringer/functions b/lib/keyringer/functions index ad18f44..59777d0 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -436,7 +436,7 @@ function keyringer_get_file { elif [ ! -f "$KEYDIR/$FILE" ]; then # Try to find a similar file count=0 - candidates=(`keyringer_exec find "$BASEDIR" "$1*.asc"`) + candidates=(`keyringer_exec find "$BASEDIR" | grep -i "$1" | grep -e '.asc$'`) if [ ! -z "$candidates" ]; then echo "Could not find exact match for \"$1\", please choose one of the following secrets:" |