From: Marc Chantreux <marc.chantreux@ulpmm.u-strasbg.fr>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: zsh best practices ?
Date: Mon, 29 May 2006 10:19:03 +0200 [thread overview]
Message-ID: <20060529081903.GA26234@ulpmm.u-strasbg.fr> (raw)
In-Reply-To: <060526084954.ZM19149@torch.brasslantern.com>
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
prev parent reply other threads:[~2006-05-29 8:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-26 8:49 Marc Chantreux
2006-05-26 15:49 ` Bart Schaefer
2006-05-29 8:19 ` Marc Chantreux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060529081903.GA26234@ulpmm.u-strasbg.fr \
--to=marc.chantreux@ulpmm.u-strasbg.fr \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).