News for hackers. Stuff that matters.
Re:Unix Tricks by cmatteri on Thursday July 03, 2014 @03:50AM (#7981994)
The article doesn't say, so it's worth mentioning that you can type ctrl-R multiple times to search further back into command history.
Re:Unix Tricks by aatos on Thursday July 03, 2014 @05:12AM (#7982162)
It doesn't mention either that you can search to the other direction by pressing ctrl-s (usually it also sends the stop signal which should be removed by "stty -ixon"). Very useful if you go past the entry you are looking for.
Re:Unix Tricks by danielweber on Thursday July 03, 2014 @07:52AM (#7982504)
I use C-r constantly. But sometimes I need to find a command, and then edit it before running it. What is the proper way to exit "search mode" and go into the normal "edit" mode?
Re:Unix Tricks by morsch on Thursday July 03, 2014 @08:00AM (#7982537)
Any movement key will do the trick. I usually use cursor-right or the end key.

It's so ingrained I had to actually do it in a shell to know what it was I did.

Re:Unix Tricks by danielweber on Thursday July 03, 2014 @10:08AM (#7983130)
ISTR pressing one of those keys would obliterate the part of my line where I was writing, putting in ^B characters.

I can't replicate it now on my test box; it works exactly the way you say it should. It may be a terminal issue; I'm currently on Windows using cygwin to ssh to Linux.

Re:Unix Tricks by aatos on Thursday July 03, 2014 @08:54AM (#7982719)
C-g (as in quit https://www.gnu.org/software/emacs/manual/html_node/emacs/Qu...) is the 'proper' way but yeah, not the only one.
Re:Unix Tricks by danielweber on Thursday July 03, 2014 @10:06AM (#7983117)
That just wipes out the whole line (on my test box).
Re:Unix Tricks by platz on Thursday July 03, 2014 @10:59AM (#7983443)
C-e ?