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

Re: Improved completion for git commit objects (__git_commit_objects)



[ Re-adding the list to CC ]

Good morning Daniel,

Daniel Hahler wrote on Thu, Mar 05, 2015 at 01:29:59 +0100:
> On 04.03.2015 03:40, Daniel Shahaf wrote:
> > Daniel Hahler wrote on Wed, Mar 04, 2015 at 00:46:42 +0100:
> >> +  : ${(AA)commits::=${(f)"$(_call_program commits git --no-pager log --oneline -2 --format='%h%n%s')"}}
> > 
> > You can remove '--oneline': it has no effect since you use '--format' later.
> 
> Ok.
> 
> It uses "-2" here (for testing purposes), but should be wider in general.
> Should this be configurable?  What would be a good default?
> 
> I think it depends on if it's displayed on the first "<tab>", or
> later.  But a basic default is probably 20?!

Yes, 20 sounds like a good default.

Re configurable, I had the same thought.  Configuring the history length
by a style would be straightforward, but I'd suggest waiting for
somebody to step up and say he'd use that knob before adding it.
(Knobs have a maintainability cost.)

I'm not sure how to go about making the second <TAB> behave differently.
Perhaps others could weigh in about that.

Cheers,

Daniel



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