• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you recommend a library for command line editing with history?  RSS feed

 
Joe Areeda
Ranch Hand
Posts: 334
2
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a few utilities that would benefit from a command line editor like bash although it doesn't need to be that sophisticated.

The functions I'd really like:
  • a history: be able to retrieve previous command and edit them
  • Use arrow keys to move around in a command line then delete/insert characters
  • Line erase
  • perhaps a print history


  • I could write such a library, if I had any spare time but I'd be surprised if someone hasn't done it yet.
    I have Googled without luck.

    Thanks,
    Joe
     
    Jaikiran Pai
    Sheriff
    Posts: 10447
    227
    IntelliJ IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Take a look at aesh or JReadline and see if that's what you are after.
     
    Ulf Dittmer
    Rancher
    Posts: 42972
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Or jline/jline2: https://github.com/jline/jline2
     
    Joe Areeda
    Ranch Hand
    Posts: 334
    2
    Java Netbeans IDE Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you both!

    Joe
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!