Search code examples
javaunixcommand-linecommand-promptledit

Adding command recall to a Unix command line application


I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc).

Is there any standard way of achieving this, or do I have to roll my own?


Solution

  • Yes, use the GNU readline library.