Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Factoring out code
- X-seq: zsh-users 9395
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Factoring out code
- Date: Tue, 6 Sep 2005 17:27:59 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1050906145833.ZM9938@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050905114253.GA7132@DervishD> <1050905200819.ZM8987@xxxxxxxxxxxxxxxxxxxxxxx> <20050906103718.GB63@DervishD> <1050906145833.ZM9938@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> dixit:
> On Sep 6, 12:37pm, DervishD wrote:
> }
> } So, how can I make a function to use the *global* argv and not
> } the local one? Can a function modify the global argv?
>
> You can't, and no.
>
> The only thing you could do would be to establish a convention, such
> as the one with reply/REPLY, and always remember to "set -- $reply"
> after calling one of those functions.
That's exactly what I was testing right now ;) But the aliases
solution is better for most of the commands, which are simple
oneliners. I need to do a bit more coding to see what things to put
in each alias.
> Your scripts would still end up looking more like the example with
> multiple dot-commands, but you can put all the alias definitions
> in one file.
I'll do that way, thanks a lot Bart :))))
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author