zsh-users
 help / color / mirror / code / Atom feed
From: "Nikolai Weibull" <now@bitwi.se>
To: "Zsh Users' List" <zsh-users@sunsite.dk>
Subject: Writing Zsh "libraries"
Date: Mon, 19 Jun 2006 15:07:16 +0200	[thread overview]
Message-ID: <dbfc82860606190607m67b8579et4d3748fd66a2f85d@mail.gmail.com> (raw)

As I have quite a few utilities written in pure Zsh, I've created a
small library of functions that I often (re)use.  The question is how
to store such a library.  Currently, I've just placed them in
$ZDOTDIR/functions/zap and then added that directory to $fpath.  That
works fine, but I need to modify $fpath and prefix functions with
"zap-".  Then I had the "brilliant" idea of removing the prefixes -
thus "zap-init" becomes "init" - and load them in the following manner
instead:

autoload -U zap/init

Then I simply call the function as "zap/init" ($ZDOTDIR/functions is
in my $fpath as well).

This works and seems to be quite a nice way to handle namespacing, but
perhaps I'm missing something vital here.

Any comments?

  nikolai


             reply	other threads:[~2006-06-19 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-19 13:07 Nikolai Weibull [this message]
2006-06-20  7:38 ` Marc Chantreux
2006-06-20  9:36 ` Peter Stephenson
2006-06-21  1:09   ` Deliverable Mail

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=dbfc82860606190607m67b8579et4d3748fd66a2f85d@mail.gmail.com \
    --to=now@bitwi.se \
    --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).