user2258552
user2258552

Reputation: 822

Bash program/wrapper that allows you to edit with arrow/delete keys

I am looking for the name of the bash program that "wraps" other commands which take input are interactive, and makes it possible for you to edit the input with arrow keys and the delete key.

For instance, if you run aws configure, you are prompted for your access keys. If you type it in and make a mistake, when you press delete, the terminal will output ^H on the screen, instead of deleting the last character. However, if you run X aws configure, where X is the bash program I am talking about, you can press the "delete" key and it will delete the last typed character, as desired. Similarly, if you run read -p "string" string, you can't use the arrow/delete keys but if you run X read -p "string" string you can [I know you could also do read -e "string" string, but sudo read -e "string" string doesn't seem to be possible on Ubuntu and anyway that isn't the point of this question.] The program X has this behavior for pretty much any such bash command as far as I recall.

I have used this program before but cannot for the life of me remember its name. I believe it is built-in to Mac OS X but I am not sure. I think it's fairly well-known. I tried Googling it but no relevant results.

Upvotes: 3

Views: 272

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798754

rlwrap is a wrapper program to allow CLI commands that prompt for input use the readline library without having to link against it.

Upvotes: 2

Related Questions