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

Re: Command != command ???



From: Philippe Troin <phil@xxxxxxxx>
Subject: Re: Command != command ???
Date: 24 Jul 2005 20:32:38 -0700

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

I am a little confused here -- seems that what I believed to know
previously is wrong...

...I am booting my linux box directly into an X-Server with a kdm
login...The shell I start then is...interactively, right? .zshrc
setopts my extendedglob...then I start a script from there...which
again is not interactively...and will "loose" some features I set in
my .zshrc...

Is this correct?

Is there a list where I can identify those features, which are not
valid for scripts, if set in .zshrc? Or do I have to read through the
whole zshall manpage?

Meino



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