Wishlist: command history across sessions
This would be pretty hard. We would need to be able to recognize what constitutes a command and store it in a database on the client side.
We would need to trap the up arrow, as well as things like ctrl-a and other cursor movement keys.
Or we could have a local buffer that showed up if they did like ctrl-uparrow (or something) which would only be sent if they pressed enter.
If we can detect a paste vs someone typing a command and store them differently, it would be really awesome. Being able to go back and edit multi-line things and reapply them would help.
I'm checking on the feasibility of this and ran across a couple of concerns. First is, do we need to interpret the control characters ourselves. i.e., if someone types "sh proc" then changes their mind and types "sh ver" the result might look like this:
sh proc\1\e[C\e[C\e[Cver \5\b\b\b\b\b\r
or it might look like this:
sh proc\1\e[C\e[C\e[Cver \5\177\177\177\177\177\r
depending on what their backspace key does.
There is also the problem of them using the builtin router history and editing an existing command. How do you store a command in history if it was "up, up, down, backspace, backspace, 'ver'"?
We could grab the command line between the router name and EOL, but that presents two issues.. it's very vendor specific and in ciscos case they wrap the line at a certain point so you would be cutting off the text anyway.
Ok, even if we did perfect emulation of the remote CLI editor and accounted for ctrl-e, ctrl-a, ctrl-w and any other key combination they might use, there is still the fact they could hit "show proc
The only way we can do this is to grab the command from the remote side.