zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: Mark Hessling <m.hessling@qut.edu.au>
Cc: zsh-workers@sunsite.dk
Subject: Re: How to change environment from a module
Date: Tue, 31 Dec 2002 01:39:42 +0000	[thread overview]
Message-ID: <20021231013942.GA6754@fysh.org> (raw)
In-Reply-To: <3e10f005.e655a.15727@imap.qut.edu.au>

Mark Hessling wrote:
>One last question; naming standards for modules. Are third-party modules
>allowed to start with "z" ? eg. I've called mine "zregina", so that the
>"regina" executable will still be available as an external program.

You seem to be confusing two namespaces here: modules and builtin
commands.  Each module provides zero or more builtin commands; there is
no necessary relationship between the name of a builtin and the name of
the module that provides it.

For the builtin command that you're providing, I suggest using the same
name as the external program if and only if you are providing the same
behaviour (as the builtins such as "rm" in the "zsh/files" module do).
In this case the external program is still available by using the
"command" builtin, but it shouldn't be necessary to use that.  If you
are providing different behaviour, such as having the command modify
zsh's environment, then use a different name; a "z" prefix to indicate
such a variation of behaviour seems entirely appropriate, and I see no
reason for us to disapprove of third-party use of such names.

Modules have a hierarchical namespace, with the first component of the
name identifying the entity publishing the module.  Modules from the
Zsh Development Group have names starting "zsh/", such as "zsh/zle"
(the zsh line editor) and "zsh/files" (file manipulation builtins).
You should name your modules in a similar fashion; e.g., you could use
module names starting "hessling/" if you're publishing them yourself.

In the common case of a module providing only a single builtin, usually
the builtin's name is also a good way to identify the functionality of
the module (e.g., "zsh/sched" providing the "sched" command).  So you
might want to use the module name "hessling/zregina", if my guesses
about the appropriate command name and module publisher were correct.

-zefram


  reply	other threads:[~2002-12-31  1:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-31  1:16 Mark Hessling
2002-12-31  1:39 ` Zefram [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-29  9:32 Mark Hessling
2002-12-29 19:23 ` Bart Schaefer
2002-12-22  5:24 Mark Hessling
2002-12-22 17:57 ` Bart Schaefer

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=20021231013942.GA6754@fysh.org \
    --to=zefram@fysh.org \
    --cc=m.hessling@qut.edu.au \
    --cc=zsh-workers@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).