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

Re: zparseopts inside functions



From: michael@xxxxxxxxxxxxx (Michaël Cadilhac)
Subject: Re: zparseopts inside functions
Date: Fri, 26 Jan 2007 17:11:36 +0100

Hi Michael,

 thanks for your reply!

 Yes, it works! :)

 ...but I thought, $ARGV and friends would be global......

 Have a nice weekend!
 mcc


> Meino Christian Cramer <Meino.Cramer@xxxxxx> writes:
> 
> >     #! /bin/zsh
> >
> >     function takeargs
> >     {   
> >         zparseopts s:=svar t:=tvar u:=uvar
> >         echo $svar
> >         echo $tvar
> >         echo $uvar
> >     }
> >
> >     takeargs
> >
> >  nothing works anymore (the echo put only "\n"'s on my screen...).
> >
> >  I am sure I missed a very basic simple thing...but unfortunately I
> >  seem to be "blinded by the screen"...
> 
> Maybe... some arguments to takeargs ? :-) Try with
>    takeargs "$@"
> I think.
> 
> -- 
>  |      Michaël `Micha' Cadilhac     |  In a World without Walls and Fences,  |
>  |         Epita/LRDE Promo 2007     |     who needs Windows and Gates?       |
>  |  http://michael.cadilhac.name     |          -- Dino Esposito              |
>  `--JID: michael.cadilhac@xxxxxxxxxxx'                                   -  --'



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