interactive filtering with less

I discovered a cool little feature in less (not less.css) today. You can interactively filter the data.

&pattern

	Display only lines which match the pattern; lines which do not match the pattern are not displayed. If pattern is empty (if you type & immediately followed by ENTER), any filtering is turned off, and all lines are displayed. While filtering is in effect, an ampersand is displayed at the beginning of the prompt, as a reminder that some lines in the file may be hidden.

	Certain characters are special as in the / command:

Activate: &pattern hit enter
Disable: & hit enter

Demo:

demo

Comments