12-02-2014 07:44 PM
This was bugging me for a while, so I thought I would post a solution:
Under Linux, when you have a multi-line command at an ArubaOS CLI prompt, and you back up to edit it, the cursor will just stay on the same line and it becomes very hard to edit or even figure out what you are doing. This is because ArubaOS does not use a full terminal support stack, and just sends back ^Hs to move the cursor back.
A solution is to turn on the "reverse wrap" feature in your terminal. How you do this depends on what terminal you are using. Turning this on has so far not caused me any issues anyplace else. Most terminals support reverse wrap but not all of them support the ANSI control sequences to control the feature and they have different ideas of how to get a default value for this option.
Many terminals these days are based on libvte. For these, you should be able to copy a file which will likely be at /usr/share/vte/termcap/xterm or a similar location to /etc/termcap and edit it. I found this not to work, but editing the file directly worked. This is tacky because your edits will be lost when libvte is upgraded.
Once you have found the file, find the lines:
xterm|X11 terminal emulator:\
and change that last line to read:
Then kill all your terminals of that type and start another and the problem should be gone.
Now, for xterm itself, you do this by adding the line:
...to your ~/.Xdefaults and to get it working right away instead of the next time you start an X session, do an 'xrdb -merge ~/.Xdefaults' and the next xterm you start should be cured of this problem.
For terminals of other pedigree, YOYO, but look for "reverse wrap" or "backwards wrap" in the manual, or options named "bw".