zsh-users
 help / color / mirror / code / Atom feed
* backspace => ^? in remote vi under screen, all shells zsh
@ 2006-02-11  1:45 Deliverable Mail
  2006-02-11  5:15 ` Bart Schaefer
  2006-02-11 16:31 ` Thor Andreassen
  0 siblings, 2 replies; 3+ messages in thread
From: Deliverable Mail @ 2006-02-11  1:45 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

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 ^?.  Note that *remote* shell is
zsh and backspace in its command line works just fine.

I dug out the solution for (the local) screen -- tell it

bindkey ^? stuff ^H

That fixes the remote vi, keeps remote zsh happy, but breaks the local
screen itself fscking up ^A <backspace> which no longer moves to the
previous window until it eats an extra key press or something.

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

Cheers,
Alexy

[-- Attachment #2: Type: text/html, Size: 848 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: backspace => ^? in remote vi under screen, all shells zsh
  2006-02-11  1:45 backspace => ^? in remote vi under screen, all shells zsh Deliverable Mail
@ 2006-02-11  5:15 ` Bart Schaefer
  2006-02-11 16:31 ` Thor Andreassen
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2006-02-11  5:15 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: backspace => ^? in remote vi under screen, all shells zsh
  2006-02-11  1:45 backspace => ^? in remote vi under screen, all shells zsh Deliverable Mail
  2006-02-11  5:15 ` Bart Schaefer
@ 2006-02-11 16:31 ` Thor Andreassen
  1 sibling, 0 replies; 3+ messages in thread
From: Thor Andreassen @ 2006-02-11 16:31 UTC (permalink / raw)
  To: zsh-users

On Fri, Feb 10, 2006 at 05:45:18PM -0800, Deliverable Mail wrote:
[...]
> I wonder whether this is a problem which can be fixed on zsh's own bindkey
> level?

I put this in my zshrc, when I encountered a similar problem:

bindkey "^?" backward-delete-char

-- 
Thor Andreassen


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-11 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-11  1:45 backspace => ^? in remote vi under screen, all shells zsh Deliverable Mail
2006-02-11  5:15 ` Bart Schaefer
2006-02-11 16:31 ` Thor Andreassen

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).