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

Re: Problem with fake-files style and cd



On 27 May 2011 07:36, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On May 27,  6:57am, Mikael Magnusson wrote:
> }
> } On 27 May 2011 06:41, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> } > There are no full-stops in any of the other items in that list.
>
> Hmm, I'm wrong about that; other-files (which is the other place that
> says "used instead") has full stops both in the middle and at the end.
> variant has one at the end only.  Not very consistent, are we.
>
> } How's this?
>
> Fine, except see below.
>
> } > More substantively, remind me what "used instead" means here?  The
> } > word "used" is not specific enough, I guess.
> }
> } I'm not sure how this is unclear, but when cdpath is set,
> } local-directories is looked up, when it is unset directories is looked
> } up.
>
> Ok, so "used" means "looked up".  But the above is true only for "cd"
> (and other commands handled by _cd), not by e.g. _files.

Oops. This then?

item(tt(directories))(
for names of directories DASH()- when the tt(cdpath) array is set,
tt(local-directories) is used instead when completing arguments of
tt(cd) and related builtin commands

Or is this better?

item(tt(directories))(
for names of directories DASH()- tt(local-directories) is used instead
when completing arguments of tt(cd) and related builtin commands when
the tt(cdpath) array is set

> And path-directories is looked up *as well*, not *instead*, though it
> is used before named-directories and after local-directories.  The
> intent is that anything that would be in directories is split among
> local- and path- when cdpath is set.

I think it's enough that the entry for local-directories refers the
reader to path-directories. It's heavily implied that path-directories
does nothing when cdpath is empty too. What is the motivation though?
Why not just always have just 'directories' and then also look up
path-directories when cdpath is set, otherwise not? Does someone
actually want local directories to complete differently depending on
$cdpath?

> } That reminds me, one of the places that uses it is the entry for
> } use-perl
>
> Well, yeah, but that one is talking about perl being run in place of
> awk.  There's only one thing "used" can possibly mean there, and
> anyway use-perl is a style name, not a tag name.
>
> } which says that _make uses this style, but since the rewrite
> } it does not. It is currently completely unused, should we remove this
> } paragraph?
> }
> } Currently this is only used in completions for `make', but it may be
> } extended depending on authorial frustration.
>
> If it's entirely unused we could remove the entire entry, or replace
> that paragraph with one that says the style name is reserved for use
> by future competion authors, or the like.

I'll remove it then if nobody complains. Or do you prefer commenting
it out in case it needs to be brought back?

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author