Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: backspace => ^? in remote vi under screen, all shells zsh



On Feb 10,  5:45pm, Deliverable Mail wrote:
} 
} I have this annoying problem -- in my local zsh and screen everything is
} OK.  But when I log into certain Red Hat 7.2 boxen from a window in that
} screen, and start vi, backspace produces ^?.

The trouble here is that all applications on both ends of the remote shell
connection have to agree on (a) what key value produces the effect of
"erase the character left of the cursor" and (b) what key value is sent
by the backspace key.

At some point during the RH6.x series, the default for the backspace key
was switched (I don't recall in which direction ... I think from ^H to
^? but I may be wrong).  This is a low-level setting, in the console
driver if you're not using X11 or the X key bindings if you are, and is
not controllable by the shell's key binding mechanism.

} Note that *remote* shell is
} zsh and backspace in its command line works just fine.

That's because zsh treats ^? and ^H as interchangable unless you have
explicitly bindkey'd it otherwise.  "Real" vi also used to do so, but
vim (the open-source vi clone favored by RH) does not.

} I wonder whether this is a problem which can be fixed on zsh's own
} bindkey level?

You *might* be able to fix it by fooling around with "stty erase" on the
remote and/or local system, but exactly what you need to do depends on
which system is remote and which is local and might change for any given
pairing.



Messages sorted by: Reverse Date, Date, Thread, Author