GNU Readline is a software library that provides line-editing and history capabilities for interactive programs with a command-line interface, such as Bash. It is currently maintained by Chet Ramey as part of the GNU Project. This series looks at some of the features of this powerful library.
The power of GNU Readline - part 3
In part 2 we looked at deleting text in various ways and pasting it back, using GNU Readline key sequences.
The full-length notes (available here) contain some new terms and features of GNU Readline, and introduce some further ways of manipulating text, with some examples.
If a machine is under heavy load and therefor kind of not responsive anymore that readline-magic comes in handy. Same goes for a slow link between a users terminal and a remote machine.
Comment #2 posted on 2018-03-10T03:25:54Z by Clinton Roy
Comment Command
I was not aware of the comment/decomment commands, they might be useful.
Comment #3 posted on 2018-03-11T13:02:59Z by clacke
Surprisingly useful
I went into this thinking "bah, readline, it's C-r, C-a, C-e, some kill and yank, what's to learn?". But it was Dave, and somehow there was a Part 3, so maybe there were something useful in there?
Wow, I was so wrong about knowing everything there is to know about readline. I don't know how useful the capitalization things are, and C-t I already knew about and I think it's mostly useful for when you have pressed C-t by mistake ... but M-b and M-f, OMG.
I have needed these for years. I usually hop around with C-left and C-right, but when you're one mosh, one tmux and one su down, usually all arrow keycodes are long gone, and it's all misery. Now with M-b and M-f my life quality will drastically improve!
Also interesting to know what the args thing is for. I've been vaguely aware of it as it's easy to trigger by mistake, but I think I will use it more now that I have been taught exactly what it does. Maybe for counting the length of git commit messages, for example. You want a 60-character max commit message length? M-6 0 C-b after you typed your message will show you by how much you overran the limit!
Thanks, Dave. As always a great contribution, even for those of us who may think we already know everything.
Comment #4 posted on 2018-03-25T16:56:39Z by Dave Morriss
Thanks for the comments
Thanks Jan, Clinton Roy and clacke.
I'm glad you are finding the series useful.
I had known of Readline's existence for years, and that there were some features that might be useful, but had never spent the time to find out what it could do. I am most surprised at the amount of work that has gone into this library and the great features it offers.
I expect to be able to get another couple of shows from it before I'm finished, and there's scope for others to contribute too if they work out cool things to do with it!
Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.
Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).