Gerd Moellmann wrote: >>Alright, what's the *&#%$! way to delete >>the last character at the top-level prompt? > > I think you have to print something after the ^H to overwrite > what ^H backspaced over.
But the erase char is destructive, if the terminal is properly configured. It's an input character, and the terminal line discipline should properly act on it. If it prints "^H", as he says, then something doesn't work, normally that's because the erase char is set to a different character but that's not the case, as he showed in the output of stty(1). Maybe resetting the terminal (via xterm's menu, "reset" or "tset"), and setting the erase char again, and then having another try will prove effective. If the problem persists, I'd try a different terminal emulator and some other programs which use cooked mode (such as /bin/ed) and, failing that, file a bug against the linux kernel (or at least ask on an appropriate mailing list). I've also seen some (broken) applications in the past that messed with the terminal settings themselves so something could've changed the erase char after he last checked and before he ran lisp. Some shells (notably bash and tcsh) also give the illusion that the erase char is properly set (because they use raw or cbreak mode, and delete backwards on any of ^H, ^? etc. without consulting the TLD settings) when in fact it isn't. -- Matthias Buelow
