zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Default setting of ZLE keymap
Date: Sat, 7 Oct 2023 14:13:33 -0700	[thread overview]
Message-ID: <CAH+w=7Yjq8mRNj-ujqMKYD18HS=P7CBvMz_c0m637Ed=9P683Q@mail.gmail.com> (raw)

For just about as long as zsh has existed, interactive shells at
startup have examined the environment variables $VISUAL and $EDITOR
for clues as to whether the default key bindings should be emacs-like
or vi-like.

Recently it was noticed that when one of these variables uses a full
path to name the editor program, the substring "vi" appearing anywhere
in that path (such as, in the name of the user's home directory) would
cause the vi-mode keymaps to be incorrectly enabled.

Two possible approaches have been suggested to address this:
(1) The whole scheme of using VISUAL / EDITOR to select zsh bindings
should be abandoned.  It's obsolete and no one uses those variables
for that purpose any longer.  Zsh should default to emacs behavior
unless an rc-file explicitly performs "bindkey -v".
(2) Continue to look at the two variables, but assure that "vi" has to
appear in the command name, that is, after the rightmost slash in any
path, or in the first word if there are no slashes.

Throwing the question out to a wider audience: If the zsh-users list
expresses no particular preference, or no need for #2, zsh-workers
will proceed with #1.

Discuss.  Thanks.


             reply	other threads:[~2023-10-07 21:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 21:13 Bart Schaefer [this message]
2023-10-08  2:46 ` Ray Andrews
2023-10-10 10:59 ` Eric Cook
2023-10-10 11:27 ` Peter Stephenson
2023-10-10 13:40   ` Re[2]: " Vadim Zeitlin
2023-10-10 19:53     ` Lawrence Velázquez
2023-10-11  0:34   ` Aaron Schrab

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='CAH+w=7Yjq8mRNj-ujqMKYD18HS=P7CBvMz_c0m637Ed=9P683Q@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).