I see about the second argument now
Just to be clear, the second argument is not for implementing a command history; it's for prompting with some default input as, for example, in install/configure scripts
...
In which directory would you like the package to be installed?
> /usr/local/foo
where the editable input "/usr/local/foo" would appear at the prompt immediately, as a suggested default choice, without the user having to hit any cursor up/down keys etc. Implementing a history via that feature would be quite cumbersome, as you'd have to read out the respective history entries yourself and present a new prompt for each entry...
With GNU readline the history is basic functionality, which should work without further ado, if you have the right backend module installed. |