Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Separate cdpath elements in path-directories completion



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