Zsh Mailing List Archive
Messages sorted by:
Best practice for smkx and ZLE?
- X-seq: zsh-users 21257
- From: Andrew Janke <floss@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Best practice for smkx and ZLE?
- Date: Tue, 9 Feb 2016 05:07:06 -0500
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=DzflchndvDB+s534Eb2oezAE2uM=; b=pJo1U Ia7PgCcn4lC08B1d6JwAGZ66z4Q4l0OKrnQzEEaYvbdBr38pgF++OFvcT/eltq9P PqHVN7n9nE5+vdXn6EaFniXYq6VoLcpgA4vvkE8/ZUpi7d5nEEqIhYE5OTFwX+4s WBqJL50z464HooMyQnJL2Xc4SGkVoQVYFd90W0=
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi, Zsh folks,
Is there a consensus in the Zsh community about whether we should generally
be using smkx/rmkx in zle-line-init/finish to switch in to application
keypad mode when ZLE is active? And if so, where it's best to configure
this - i.e. in system-wide /etc/z* files vs. individual user's ~/.zshrc?
I've run in to this a few times working with my own config files and with
Oh My Zsh, and am wondering whether the generally accepted thing is
to do so at this point.
On the upside, doing `smkx` means you can use the terminfo entries to
portably get the character sequences for the arrow and home/end keys.
On the downside:
- zle_line_init() doesn't compose easily (like $precmd_functions and other
multi hooks do), so one init file's definition can clobber another's,
and whoever defines the effective zle_line_init must include it.
- smkx (usually) puts both the cursor and numeric keypads in to
There's no default binding for the sequences emitted by the numeric
keypad in app mode, so using it gives you junk on the command line,
instead of numbers.
- Among smaller terminal emulators, there's more variability in behavior
in application mode than in normal mode. E.g. some don't change Home
and End behavior while in cursor application mode, or respect smkx
at all, though they still set $TERM to 'xterm'. But their normal mode
behavior tends to match xterm's. So terminfo-based
cursor key bindings may end up being less portable in practice.
There've been a few discussions about it on this list with respect to
But I don't know if there's general consensus, and I haven't seen
anything in the Zsh reference manual or other documentation
recommending it for general use. Any conclusions on this?
Messages sorted by: