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

Re: PATCH: completion of dates



On Jul 12,  1:25am, Oliver Kiddle wrote:
}
} I think I've finally guessed what the likely cause is: a file-patterns
} style. _globquals then gets called for each of the file patterns that is
} completed together. That is a bug in _files/_path_files.
} 
} I think the solution is to move the glob qualifier handling from the
} beginning of _path_files to the beginning of _files. It can then be
} done before the file-patterns are processed and so done once only. The
} disadvantage is that glob qualifier completion wouldn't then work with
} _path_files. However, _path_files is typically used instead of _files in
} the type of situations where glob qualifiers aren't applicable.

Hmm, I'm not sure that last is really true.  About two-thirds of the uses
are either (1) to pass the -/ option, which _files accepts but converts
into a pattern because it uses it to split into the "directories" tag,
and (2) to pass the -g option for much the same reason.  Glob qualifiers
for the file type don't apply in those cases, but qualifiers like (F) or 
(l+0) might apply.

Are there a lot of cases where _path_files could be replaced by _files?  
That'd introduce file-patterns and ignore handling in a bunch of places
where it doesn't happen now, among other things such as e.g. allowing
_next_tags to advance from directories to all-files.

Maybe the way to go is to handle glob qualifiers in BOTH places, and
not call down into _path_files from _files while "inside" the quals?



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