zsh-users
 help / color / mirror / code / Atom feed
* Set option in parent after emulate -L zsh
@ 2017-03-09  8:58 Sebastian Gniazdowski
  2017-03-09 22:06 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gniazdowski @ 2017-03-09  8:58 UTC (permalink / raw)
  To: zsh-users

Hello,
doing:

% unsetopt promptsubst   # Should see garbage in prompt
% () { setopt promptsubst; }

restores correct prompt. Then, to handle emulate -L:

emulate -L zsh
unsetopt promptsubst
() { setopt promptsubst; }   # no change
() { unsetopt localoptions; setopt promptsubst; }   # prompt restored
echo $options[localoptions] $options[promptsubst]   # shows "on on"

I wonder what does the "unsetopt localoptions" do. It connects current
function's level with parent locallevel in context of options, not
harming parent "localoptions" setting? That would be the best
possibility, but I'm afraid something different might be happening
maybe?

-- 
  Sebastian Gniazdowski
  psprint3@fastmail.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-14 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09  8:58 Set option in parent after emulate -L zsh Sebastian Gniazdowski
2017-03-09 22:06 ` Bart Schaefer
2017-03-10  5:47   ` Daniel Shahaf
2017-03-14 19:17   ` Sebastian Gniazdowski
2017-03-14 20:24     ` Bart Schaefer
2017-03-14 20:39       ` Sebastian Gniazdowski

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).