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

zparseopts inside functions



 Hi,

  I wrote a little testscript:

    #! /bin/zsh
    
    zparseopts s:=svar t:=tvar u:=uvar
    echo $svar
    echo $tvar
    echo $uvar

 which works nice.

 But if I write this instead:

    #! /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"...

 Thank you very much in advace!
 Have a nice weekend!
 mcc




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