The Readline Library

In this lesson, you’ll learn about what readline is, what bash looks like without it, and how to manipulate and find out more about its features.

Readline is one of those technologies that is so commonly used people don’t realise it’s there. In this lesson I want to make you aware of it and introduce some concepts and examples of its use so you’re able to deal with any problems that arise from its use or misuse.

How Important is this Lesson?

Writing bash does not require a knowledge of readline. Understanding readline helps greatly to understand what is going on at the terminal and at the command line.

Bash Without Readline

First you’re going to see what bash looks like without readline.

In your ‘normal’ bash shell, hit the TAB key twice. You should see something like this:

Display all 2335 possibilities? (y or n)

That’s because bash normally has an autocomplete function that allows you to see what commands are available to you if you tap TAB twice.

Hit n to get out of that autocomplete.

Similarly, if you hit the up arrow key a few times, then the previously-run commands should be brought back to the command line.

Now type:

Get hands-on with 1200+ tech skills courses.