3 ms·
Close--it's those lines matching some pattern within the last 10 lines. Think of it as localize, then filter. I've written it the other way, too, but this seems
by kmstout 6y ago
Close--it's those lines matching some pattern within the last 10 lines. Think of it as localize, then filter. I've written it the other way, too, but this seems more natural to me. (Also, a direct h2e invocation would take the arguments from the command line; h2ei will ask every time.)
In practice, I will do something, realize that the thing I just did over the last several minutes could be useful--or the core of something more general--and then strike F12 to start h2ei. At the prompts, I'll generally give it a nice round number like 10 or 20 or 50 lines, leave the default pattern, and set the filename to be something evocative in ~/bin. An editor will immediately open on my new shell script, and I can trim it down and continue hacking on it from there.
The key idea is that I get an easier path from doing something ad hoc to creating something more useful in the long run.