svent / sift

A fast and powerful alternative to grep
https://sift-tool.org
GNU General Public License v3.0
1.6k stars 108 forks source link

pager support #82

Open federicoviscomi opened 8 years ago

federicoviscomi commented 8 years ago

Is there a way of piping the output into less and still preserve the original colours and output? I've tried using sift PATTERN --group | less -R but it doesn't work It would be nice to have a --pager option similar to http://beyondgrep.com/

svent commented 8 years ago

sift deactivates grouping and colored output when it writes to a pipe. This ensures that sift works as expected when used in scripts, even if a sift config file enables colored/grouped output by default. The color option can be overridden with --color: sift PATTERN --color | less -R Unfortunately, the deactivation of the --group option when writing to a pipe cannot be overrriden. I will take a look at implementing something like a --pager option.