Lurker News

Comments (217) 34 threads

Earlier comments
d0mine#
Related: percol utility allows to narrow a process output interactively https://github.com/mooz/percol

I use it all the time to select a command from my shell history. It is a very convenient addition to zsh-autosuggestions (one of those things that you use hundreds times per day without even thinking about it).

ddalex2 replies#
Late to the party. This screams like it needs to be part of the shell instead of an addition.

E. G. I type a command in the shell, end it with pipe, and press enter, it doesn't delete the command but runs a preview of the output top 10 lines? This way I can continue to the edit the command without losing the context, the pipe, or I can decide to redirect it to a file!

akavel#
Hmm, interesting thought! The tool needs to do some ugly buffering however; would there be place for it in a shell? Also, I suppose some kind of "Ctrl-Enter" or something would be a better idea instead? So that it could also be hit at any point in the line... But how about scrolling through the preview?
gregwebs1 reply#
The most frequent use case for this for me would be interactive grep. The "fzf" tools has this along with fuzzy search. And the text doesn't disappear while you type "grep" like it does with "up".

I will definitely try this out too though when I make a pipeline with sed, cut, etc.

isodude#
You know that less has interactive grep right? Type & phrase To go back: &

Load more comments