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

Re: Git-add completion should show full file paths

Bart Schaefer wrote on Tue, 28 Apr 2020 20:42 -0700:
> On Tue, Apr 28, 2020 at 11:01 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Bart Schaefer wrote on Mon, 27 Apr 2020 21:35 -0700:  
> > > ... call something OTHER THAN _multi_parts if you don't want the
> > > strings treated as having multiple parts?  
> >
> > That'd force everyone to use the "list of all files" semantics.  
> I don't mean unconditionally call something else.  I mean, check a
> style and either call _multi_parts, or not.

I assumed making _multi_parts opt-outable would be useful for all uses
thereof, not just for the _git-files one.

> > > That could be put into a wrapper function around the two possible
> > > _wanted calls above, if it were desirable to have it somewhere other
> > > than in _git_files.  
> >
> > Seems like this would also allow people to use «zstyle -e» to choose
> > between the two behaviours dynamically, which could be used to
> > implement the "if there are more than x files" semantics dana described.  
> Yes, or the algorithm for that could be built into the wrapper and
> activated by a style value.

Sure.  Personally, though, I'd recommend to test-drive potential styles
using «zstyle -e» (or other means) before adding them to _git as
first-class supported APIs.



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