lesskeys manpages, I have created a file containing:
^B shell touch ~/testfile
and run it through
lesskey to generate
.less-test, then executed
less -k .less-test file. This all works fine and does what I hope, except that I need to hit enter twice to actually execute the shell command and return to the
file. Changing the command to
touch ~/testfile\n removes the need for one of those enter presses, but
touch ~/testfile\n\n doesn't work to get rid of them both. Is there a way to bypass hitting enter at all here?
As a follow-up question (and to explain why I'm asking in the first place)--I am doing this as a process of file tagging, where I inspect the file using less and want to use these hotkeys to write out to another file with one of two tags (which I plan to bind to two different key sequences). So in addition to not having to press enter twice as above, I'd also like to know if there's a way to immediately move to the next file (as with the
next-file lesskey command) also (that is, press no other keys besides the tagging key sequence).