Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zparseopts inside functions
- X-seq: zsh-users 11145
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: michael@xxxxxxxxxxxxx
- Subject: Re: zparseopts inside functions
- Date: Fri, 26 Jan 2007 18:13:36 +0100 (CET)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <87y7npn4xz.fsf@xxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070126.165503.74742074.Meino.Cramer@xxxxxx>	<87y7npn4xz.fsf@xxxxxxxx>
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