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

Re: sourcing a sh file in zsh



On Tue, Jan 27, 2009 at 00:07, Phil Pennock
<zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:

> What I do like with the
> setopt approach is that there's a way for zsh to test if this is
> currently the case.
>
> Eg, for bash/zsh portability, you could do:
>  if [[ -n $ZSH_VERSION && -o sticky_options ]]
> since both support [[ conditional ]] and both support -o as a unary
> prefix test (both using it for testing shell options).

emulate could simply set $ZSH_STICKY to 'sh' or something
similar could happen. It would give more information than a simple
[[ -o sticky_options ]] and tie into existing mechanisms just as
nicely.


Richard



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