From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: The old backspace/delete problem
Date: Wed, 19 Jan 2005 17:36:35 +0000 [thread overview]
Message-ID: <1050119173635.ZM3635@candle.brasslantern.com> (raw)
In-Reply-To: <200501191422.j0JEMfxA020496@news01.csr.com>
On Jan 19, 2:22pm, Peter Stephenson wrote:
} Subject: Re: The old backspace/delete problem
}
} Boyd Adamson wrote:
} > alias ^?='stty erase ^?'
} > alias ^H='stty erase ^H'
} >
} > Any ideas on how we could do this sort of auto-detection in zsh?
}
} It's doable; there's a slight catch, but I think I've managed to make it
} almost invisible to the user.
That's a pretty cute trick, Peter. I think it still runs into problems
with "ttyctl -f", though?
I have this little function in my .zlogin file:
function stty_backspace {
local bs
while (( #bs != 8 && #bs != 127 ))
do
print -n 'Press backspace: '
read -k 1 bs || return 1
print -nP '\r%E'
done
stty erase "$bs"
}
I invoke that (still in .zlogin) if various other tests for the type
of terminal and host operating system fail to intuit the correct value.
(Those tests are dependent on knowledge of hardware/OSs on my LAN, so
it's not useful to post them here.)
This means that I sometimes get an extra prompt on login, but it also
means that I can be sure to run it before ttyctl.
I like your idea better, though.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2005-01-19 17:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 13:12 Boyd Adamson
2005-01-19 14:22 ` Peter Stephenson
2005-01-19 17:36 ` Bart Schaefer [this message]
2005-01-19 18:10 ` Peter Stephenson
2005-01-24 20:36 ` Seth Kurtzberg
2005-01-20 3:33 ` Boyd Adamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1050119173635.ZM3635@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).