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?
Yes, use the GNU readline library.
I think you are looking for something like JLine but I've never used it so cannot attest to its quality.
She can apparently deal with autocompletion and command line history, and the last release was recently (feb this year) so it's by no means dead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With