help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: zsh-workers@zsh.org
Subject: Re: Separate cdpath elements in path-directories completion
Date: Fri, 24 Feb 2023 13:57:55 +0100	[thread overview]
Message-ID: <41068-1677243475.699476@tn19.Zkd5.g9Yx> (raw)
In-Reply-To: <20230221221247.aacrywwb7fmnzmew@singold.localdomain>

On 21 Feb, Sebastian Stark wrote:
> I think a tag should be a) unique and b) easily addressable via zstyle.

The index achieves that and will work fine for anyone who doesn't
regularly make dynamic changes to their $cdpath. To use your example,
I prefer path-directories-1 to path-directories---git but am open to
alternatives if someone feels strongly. For now, I'll apply your patch,
albeit tweaked to address the point Bart made:

Bart wrote:
> Strictly speaking unless $elem is always a full path, the argument to
> -W should be enclosed in parens like:

> alt+=( "path-directories-$elem:directories in $elem:_path_files -W '($elem)' -/" )

I'm getting files from root mixed in if I use _path_files -W '( .. )'
Is that intentional or a bug? While the documentation states that it can
be an array, full path or paren-enclosed list, it can be a non-array
variable or reference to an array element. That works for things like ..
appearing in $CDPATH so is what I've used.

Thanks Sebastian for updating and contributing the patch.


      reply	other threads:[~2023-02-24 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230218211046.vj3p4k7y6uraytpo@singold.localdomain>
     [not found] ` <CAH+w=7bhjyXVgMb7esyg-1n0SbBAZogUrCVg34wFB64z3aUimg@mail.gmail.com>
     [not found]   ` <20230219100217.f2mcniygwgbtxvwf@singold.localdomain>
2023-02-19 16:51     ` Oliver Kiddle
2023-02-20  3:54       ` Bart Schaefer
2023-02-21 22:12       ` Sebastian Stark
2023-02-24 12:57         ` Oliver Kiddle [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41068-1677243475.699476@tn19.Zkd5.g9Yx \
    --to=opk@zsh.org \
    --cc=zsh-workers@zsh.org \


* 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


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).