Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: allow zsh to source a script and then become interactive



On Apr 15,  1:41am, Nikolay Aleksandrovich Pavlov (ZyX) wrote:
}
} I tried to play with
} `ENV==(<<< $'emulate zsh\necho abc') ARGV0=sh zsh`,
} but apparently this does not work: e.g. I do not see `$path` variable
} in this case, though I do see `abc`. Guess $ENV is too late to
} switch emulation mode and have all necessary initialization steps be
} performed.

Using "emulate" only changes setopts, it doesn't re-initialize other
state that would be in place before the startup files are sourced.

Good idea, though -- it might work for Anthony's case.  I'd recommend
"emulate -R zsh" for more thorough option reset.



Messages sorted by: Reverse Date, Date, Thread, Author