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

Re: zsh in screen - bad erase key ^@ instead of ^H or ^?




Peter Stephenson wrote:
> On Mon, 17 Dec 2007 23:09:55 -0800
> Chuck <GBSCDcM8oX5F7qrd@xxxxxxxxxx> wrote:
>   
>> How do I tell zsh in screen that my backspace key is ^H or ^? instead of
>> ^@ as it currently thinks? stty erase '^@' fails as does using tset.
>>     
>
> It may be you're doing the opposite of what you need...
>
>   
>> ^v(bs key) tells me bs is currently ^@.
>>     
>
> ...this indicates the backspace key currently *is* sending ^@, because
> the ^V stops zsh interpreting the character.
>
> So instead, try making it so that it sends ^H or ^?: "stty erase '^?'".
> (This is likely to be some artefact of screen since zsh doesn't
> change special characters of that sort.)
>   
Unfortunately, bs really is sending ^@ in screen and I cannot change it.
stty erase '^H' or '^?' doesn't change bs at all. It's as if the key
mapping at a lower level is screwed up.
> If for some reason you're stuck with the backspace key sending ^@, you
> can use "bindkey" to tell zsh to use it for functions usually bound with ^?
> and ^h, but you shouldn't need to do that.
>   
I added a bindkey "^@" "backward-delete-char" in my zshrc when TERM =
screen and I can hit bs and it works in zsh proper. If I run vim though,
my editor of choice, the bs key just throws me out of edit mode instead
of deleting the previous char.



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