I'd like to have a pager program, similar to less
, with the following added commands:
- Prompt for a regular expression and display only lines that match it;
- Prompt for a regular expression and remove from the current display lines that match it; and
- Revert to showing the entire file.
- Show the current filters.
Another nice feature would be an optional visual indication that lines have been hidden.
Filtering the input to `less, as in:
grep pattern filename | less
is only a partial solution. It's missing the ability to easily reconfigure the filtering without exiting and restarting the pager.
I'm looking for something that works in text mode, though a GUI tool would also be helpful.
I've taken a quick look at the most
pager, and it doesn't seem to have such a feature.
Ideally I'd like to see this as a new feature in a future release in less
. I might contact the maintainer with a suggestion. Meanwhile, does such a thing already exist?
slit
github.com/tigrawap/slit that looks close to what I was asking about. I haven't tried it yet. The build instructions are only for MacOS. – Keith Thompson Apr 19 '17 at 15:42