Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at

hpr2505 :: The power of GNU Readline - part 3

More useful key combinations

<< First, < Previous, , Latest >>

Thumbnail of Dave Morriss
Hosted by Dave Morriss on 2018-03-09 is flagged as Explicit and is released under a CC-BY-SA license.
command line, cli, GNU Readline. 4.
The show is available on the Internet Archive at:

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:27:11

GNU Readline.

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.


Subscribe to the comments RSS feed.

Comment #1 posted on 2018-03-09 20:49:24 by Jan

Some Lines Of Support

Hi Dave!

Thanks a lot for Your effort.

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-10 03:25:54 by Clinton Roy

Comment Command

I was not aware of the comment/decomment commands, they might be useful.

Comment #3 posted on 2018-03-11 13:02:59 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-25 16:56:39 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!

Leave Comment

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 :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?