开发者

tools for creating user-friendly command-line prompt?

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 hist开发者_JAVA百科ory

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.


Most of these use the GNU readline library

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜