Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh best practices ?
- X-seq: zsh-users 10340
- From: Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: zsh best practices ?
- Date: Mon, 29 May 2006 10:19:03 +0200
- In-reply-to: <060526084954.ZM19149@xxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060526084922.GA21991@xxxxxxxxxxxxxxxxxx> <060526084954.ZM19149@xxxxxxxxxxxxxxxxxxxxxx>
Hi Bart,
Thanks for answer.
le 26/05/2006,
Bart Schaefer nous écrivait :
> We should add something to Etc/zsh-development-guide discussing the
> conventions for naming completion functions, widgets, etc. that go
> into the distribution; I don't see anything in there about that.
hope it will come soon.
> It's a little more difficult with zsh than with perl because "private"
> functions are still usually something you type on the command line,
> not hidden in a libarary somewhere. It's almost like asking if there
> is a naming convention for files in the directories in $PATH. The
> completion system is a major exception to this.
i know the difficulty of that and thought that long time zsh scripters
had already shared their tips.
> One convention is to stick a "z" in front of anything that replaces a
> similarly-named external command, but that doesn't help where the dist
> has already adopted it.
> I sometimes use *two* leading underscores, but only if I'm really worried
> about a name collision.
thinking about it, i've decided to mix both : "private" functions will
be prefixed by z__ and local vars will be prefixed by the name of their
function.
For exemple:
function z__association_compare
variable z__association_compare_current_key
Thanks for clues and regards,
mc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author