From: Bimba Shrestha Date: Tue, 5 May 2020 17:03:57 +0000 (-0700) Subject: adding help text X-Git-Tag: v1.4.5^2~44^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ff16b42462ea41402d10b0fec0ba78934002db4;p=thirdparty%2Fzstd.git adding help text --- diff --git a/programs/zstdgrep b/programs/zstdgrep index 168ec281e..60d5fe16d 100755 --- a/programs/zstdgrep +++ b/programs/zstdgrep @@ -46,6 +46,24 @@ escape=' $s/$/'\''/ ' +# We might want to create a c program in the future +# and replace this file with that if these +# unsupported options become necessary +usage="Usage: $0 [OPTION]... [-e] PATTERN [FILE]... +OPTIONs are the same as grep with the exception of +the following unsupported options: + --dereference-recursive (-R) + --directories (-d) + --exclude + --exclude-from + --exclude-dir + --include + --null (-Z), + --null-data (-z) + --recursive (-r) +grep --help below: +" + operands= files_with_matches=0 files_without_matches=0 @@ -97,6 +115,7 @@ while [ "$#" -gt 0 ] && [ "${endofopts}" -eq 0 ]; do optarg=" '"$(sed "$escape") || exit 2;; esac pattern_found=1;; + (--h | --he | --hel | --help) echo "$usage"; eval "$grep --help" || exit 2; exit;; (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \ | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \ | --with-filename)