Skip to content

Commit 1f1f375

Browse files
committed
Merge branch 'es/retire-efgrep'
Prepare for GNU [ef]grep that throw warning of their uses. * es/retire-efgrep: check-non-portable-shell: detect obsolescent egrep/fgrep
2 parents de73968 + 2b52163 commit 1f1f375

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/check-non-portable-shell.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ sub err {
4545
/\bhead\s+-c\b/ and err 'head -c is not portable (use test_copy_bytes BYTES <file >out)';
4646
/(?:\$\(seq|^\s*seq\b)/ and err 'seq is not portable (use test_seq)';
4747
/\bgrep\b.*--file\b/ and err 'grep --file FILE is not portable (use grep -f FILE)';
48+
/\b[ef]grep\b/ and err 'egrep/fgrep obsolescent (use grep -E/-F)';
4849
/\bexport\s+[A-Za-z0-9_]*=/ and err '"export FOO=bar" is not portable (use FOO=bar && export FOO)';
4950
/^\s*([A-Z0-9_]+=(\w*|(["']).*?\3)\s+)+(\w+)/ and exists($func{$4}) and
5051
err '"FOO=bar shell_func" assignment extends beyond "shell_func"';

0 commit comments

Comments
 (0)