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

Re: False alarm (nonomatch and cshnullglob)



On Jul 25, 10:10pm, Zoltan Hidvegi wrote:
} Subject: Re: False alarm (nonomatch and cshnullglob)
}
} > I should have mentioned that this implementation is not suitable for use
} > in combination with "setopt localoptions" in shell functions.  If you
} > use this wrapper, then your shell functions that desire localoptions need
} > to always use "builtin setopt".
} > 
} > Having the behavior itself built in to zsh would eliminate that problem.
} 
} Note that a function can always change options of the caller by unsetting
} localoptions before return.

Yes, which means that any function that's going to be a wrapper around
"setopt" has to unsetopt localoptions, which is what my functions do.
Thus even if you try to setopt localoptions, the setopt wrapper will
still change the options of the caller.

If you can think of a workaround for this, I'd be thrilled to hear it.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"




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