From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: why can't we use "vared" in a subshell in interactive shells?
Date: Sat, 8 Feb 2020 13:23:46 -0800 [thread overview]
Message-ID: <CAH+w=7bPzojvddGXkLhYgwyoZZXBJtihcfmS386YxJwfPANrqw@mail.gmail.com> (raw)
In-Reply-To: <20200208193653.76grgvjdwkgfzbqs@chazelas.org>
On Sat, Feb 8, 2020 at 11:37 AM Stephane Chazelas <stephane@chazelas.org> wrote:
>
> $ (vared -c var)
> vared: ZLE not enabled
>
> Why?
Looks like an overlooked side-effect to me. The assumption being made
is that in interactive mode, if USEZLE is false then it's because the
user has explicitly unsetopt'd it, not because it was temporarily
disabled on entry to a subshell.
There are two ways we could go here:
1) Assume that if the user has invoked vared, then it's OK to run ZLE
even if it was otherwise turned off, and just remove that test
entirely. (The check for TERM == emacs is mostly obsolete anyway, if
we're attempting to do that we should be looking for [absense of]
certain terminfo values, not a specific terminal type.)
2) Figure out some way to remember the old state of USEZLE when
entering the subshell, and check that in bin_vared instead of checking
the current state.
next prev parent reply other threads:[~2020-02-08 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 19:36 Stephane Chazelas
2020-02-08 21:23 ` Bart Schaefer [this message]
2020-02-08 22:41 ` Stephane Chazelas
2020-02-09 8:01 ` Stephane Chazelas
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=7bPzojvddGXkLhYgwyoZZXBJtihcfmS386YxJwfPANrqw@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@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).