zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: zsh best practices ?
Date: Fri, 26 May 2006 08:49:54 -0700	[thread overview]
Message-ID: <060526084954.ZM19149@torch.brasslantern.com> (raw)
In-Reply-To: <20060526084922.GA21991@ulpmm.u-strasbg.fr>

On May 26, 10:49am, Marc Chantreux wrote:
}
} is there a document about zsh coding style and best practices?

Not really.

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.

} i want to adopt a convention for private functions and variables.
} Perl coders are using names beginning with _ but this is used for
} completion functions in zsh.
} 
} Is there another convention adopted?

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.

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.


  reply	other threads:[~2006-05-26 15:50 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 [this message]
2006-05-29  8:19   ` Marc Chantreux

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=060526084954.ZM19149@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).