From 8732213db41e4d080651f85b0e6fcee1ebacf612 Mon Sep 17 00:00:00 2001 From: Norbert Buchmueller Date: Tue, 17 Apr 2018 00:10:34 +0200 Subject: Add tests and documentation of passing options to grep(1) --- src/password-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/password-store.sh b/src/password-store.sh index b852d06..0c9b35d 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -266,7 +266,7 @@ cmd_usage() { $PROGRAM [show] [--clip[=line-number],-c[line-number]] pass-name Show existing password and optionally put it on the clipboard. If put on the clipboard, it will be cleared in $CLIP_TIME seconds. - $PROGRAM grep search-string + $PROGRAM grep [GREPOPTIONS] search-string Search for password files containing search-string when decrypted. $PROGRAM insert [--echo,-e | --multiline,-m] [--force,-f] pass-name Insert new password. Optionally, echo the password back to the console @@ -395,7 +395,7 @@ cmd_find() { } cmd_grep() { - [[ $# -lt 1 ]] && die "Usage: $PROGRAM $COMMAND search-string" + [[ $# -lt 1 ]] && die "Usage: $PROGRAM $COMMAND [GREPOPTIONS] search-string" local passfile grepresults while read -r -d "" passfile; do grepresults="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | grep --color=always "$@")" -- cgit v1.2.3-59-g8ed1b