diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-11-02 16:08:31 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-11-03 22:35:56 +0100 |
commit | 0fb070c70e24ca4c418b8a552d8cfb36ce005a39 (patch) | |
tree | e48d2658ffc8dc6aa6047bea59688a8fdbcde33f /bin | |
parent | 690c3c37560ce15091f9e67b82db226a9d951d3d (diff) |
Remove '-x' option
This program shouldn't know about file extensions. If that is wanted,
use something like `find ... | grep ... | xargs grepc ...`.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/grepc | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -3,7 +3,6 @@ # Defaults: git='no'; -ext='\.[ch]$'; FILES='.'; iflag=''; lflag=''; @@ -41,7 +40,7 @@ grepc_err() grepc_parse_cmd() { - while getopts "cghiklt:x:" opt; do + while getopts "cghiklt:" opt; do case "$opt" in c) cflag='yes'; @@ -151,9 +150,6 @@ grepc_parse_cmd() esac; tflag='yes'; ;; - x) - ext="$OPTARG"; - ;; ?) exit 1; # getopts(1) prints an error msg. ;; @@ -195,7 +191,6 @@ grepc_find_files() else find $FILES -type f; fi \ - | grep -P -- "$ext" \ | xargs grep -${iflag}lPI -- "$1" \ | tee "$files_use" \ | xargs grep -${iflag}lP -- "$1\b" \ |