Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Separate cdpath elements in path-directories completion
- X-seq: zsh-workers 51463
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Separate cdpath elements in path-directories completion
- Date: Sun, 19 Feb 2023 19:54:26 -0800
- Archived-at: <https://zsh.org/workers/51463>
- In-reply-to: <80615-1676825482.916080@qR5n.Nmed.T67B>
- List-id: <zsh-workers.zsh.org>
- References: <20230218211046.vj3p4k7y6uraytpo@singold.localdomain> <CAH+w=7bhjyXVgMb7esyg-1n0SbBAZogUrCVg34wFB64z3aUimg@mail.gmail.com> <20230219100217.f2mcniygwgbtxvwf@singold.localdomain> <80615-1676825482.916080@qR5n.Nmed.T67B>
On Sun, Feb 19, 2023 at 8:52 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> Also, I would probably suggest expanding the description to "directory
> in $elem" instead of just "$elem" as here:
>
> > + alt+=( "path-directories-$elem:$elem:_path_files -W $elem -/" )
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 also unsure about including $elem in the tag. It will probably work
> fine but doesn't exactly conform with usual tag naming conventions.
> Perhaps just an index for the position in the cdpath array. Does anyone
> else have an opinion on that?
If just an index it would be hard to e.g. colorize based on location.
But I don't have any suggestions for a different transformation.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author