zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Dynamic directory name function
Date: Wed, 23 Sep 2015 09:48:21 +0100	[thread overview]
Message-ID: <20150923094821.5c5d0b80@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <150922210756.ZM30253@torch.brasslantern.com>

On Tue, 22 Sep 2015 21:07:56 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Sep 22,  8:42pm, Peter Stephenson wrote:
> } Subject: Dynamic directory name function
> }
> } For almost as long I've been meaning to turn this into a generic
> } function that you can configure just with a few variables.  I've finally
> } done that, and this has allowed me to add the completion support that
> } was missing before.
> 
> I have one immediate suggestion:  Use zstyle instead of variables.

I did think about that.  But having written the wrapper function, with
the variables the way they are, everything immediately fell out neatly
and clearly with associative arrays having a natural meaning.  zstyle
would just obscure the way the hierarchy was linked for no real gain ---
quite possibly to the point where I couldn't remember how to do it even
myself and wouldn't actually use it, in which case the whole thing would
be a waste of time.  (I can never remember how the more complicated
styles work in completion.)

But maybe you can come up with an example of how you'd set styles that
shows it working neatly and obviously.

pws


  reply	other threads:[~2015-09-23  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 19:42 Peter Stephenson
2015-09-23  4:07 ` Bart Schaefer
2015-09-23  8:48   ` Peter Stephenson [this message]
2015-09-23  9:55     ` Peter Stephenson
2015-09-24  6:10     ` Bart Schaefer
2015-09-24  8:37       ` Peter Stephenson

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=20150923094821.5c5d0b80@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /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).