I'd like to use ag as if I would use grep with --line-buffered. Is it possible? If not what other options do I have to mimic such behaviour?
Asked
Active
Viewed 718 times
1 Answers
3
I would like to have ag
support --line-buffered
style functionality as well.
I have raised PR #719 against the ag
Github repo to request this functionality.
In the meantime, the best solution I've found is to wrap ag
with stdbuf -oL
.
# instead of grep
grep --line-buffered pattern
# use ag with a stdbuf wrapper
stdbuf -oL ag pattern

fallwith
- 31
- 3
-
The rg (ripgrep) tool has now gained support for the --line-buffered switch as of v0.10.0. – fallwith Sep 08 '18 at 19:03