diff options
| author | Jakob Kaivo <jkk@ung.org> | 2022-04-28 11:40:37 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2022-04-28 11:40:37 -0400 |
| commit | 16e71ffb8a14cb831859db546ee16911ebc1f598 (patch) | |
| tree | c0a39b0cfae77942e1aeb0a13ce26644d868b0ea /grep.c | |
| parent | b7b37e986c7e4ca819f9cbbf683033f149f74e4b (diff) | |
add (standard input) when needed
Diffstat (limited to 'grep.c')
| -rw-r--r-- | grep.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -48,6 +48,7 @@ static int grep_inverse = 0; static int grep_silent = 0; static int grep_exact = 0; +/* TODO: handle -x */ static int grep_match_re(struct grep_list *head, const char *buf) { for (struct grep_list *c = head; c != NULL; c = c->next) { @@ -111,6 +112,8 @@ static uintmax_t grep(struct grep_list *head, const char *path) } return 2; } + } else { + path = "(standard input)"; } uintmax_t found = 0; |
