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

Re: Command != command ???



Meino Christian Cramer <Meino.Cramer@xxxxxx> writes:

> > You setopt extendglob in your zshrc, which is not sourced for your script.
> > 
> > Either move the setopt to zshenv, or add setopt extendedglob to your
> > script.
> > 
> > Phil.
> 
> Thank you for you reply.
> 
> I have set extendedglob in my .zshrc...is that not sufficient ?

.zshrc is only sourced for interactive shell.  A script is considered
non-interactive.  .zshenv is *always* loaded (except if your admin
unsetopt's RCS in /etc/zshenv, but that would be idiotic).  Yet,
that's not the answer to your problems.

No, Bart's right in <1050724232221.ZM26877@xxxxxxxxxxxxxxxxxxxxxxx>.
Extended_glob is not necessary for **.

Yet, the manual states (FILENAME GENERATION > Recursive Globbing):

       As a shorthand, `**/' is equivalent to `(*/)#'; note  that
       this  therefore  matches files in the current directory as
       well as subdirectories.

And earlier on (FILENAME GENERATION > Glob Operators):

       x#     (Requires EXTENDED_GLOB to be set.)   Matches  zero
              or  more occurrences of the pattern x. 

Should we fix the manual?

Phil.



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