Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
why can't we use "vared" in a subshell in interactive shells?
- X-seq: zsh-workers 45400
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: why can't we use "vared" in a subshell in interactive shells?
- Date: Sat, 8 Feb 2020 19:36:53 +0000
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
from
https://unix.stackexchange.com/questions/565718/zsh-timeout-for-vared-builtin/566442?noredirect=1#comment1053418_566442
In a script, both
vared myvar
and
(vared myvar)
work, but in an interactive shell, the latter doesn't:
$ (vared -c var)
vared: ZLE not enabled
Why?
The code indeed has:
if ((interact && unset(USEZLE)) || !strcmp(term, "emacs")) {
zwarnnam(name, "ZLE not enabled");
return 1;
}
And entersubsh() has
opts[USEZLE] = 0;
zleactive = 0;
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author