tools for creating user-friendly command-line prompt?

345 views Asked by At

I notice that some programs (e.g. sqlite, mysql client) provide a command-line prompt that is very similar in capabilities to the bash's, including:

  • line editing with left and right arrows, delete, insert, ^K, etc.
  • history browsing with up and down arrows
  • ^R for reverse i-search in command history

which make me think that they are using the same toolset for this.

I'd like to create a prompt with similar capabilities in my program, which tools can I use? I prefer it to have the same functionality as in bash, so that the users would be familiar with it.

1

There are 1 answers

4
Hasturkun On BEST ANSWER

Most of these use the GNU readline library