From: Rubén Justo Date: Thu, 29 Feb 2024 19:00:26 GMT Subject: Re: [PATCH 3/4] completion: reflog with implicit "show" Message-ID: In-Reply-To: On Wed, Feb 21, 2024 at 07:06:36PM +0100, Rubén Justo wrote: > On Tue, Feb 20, 2024 at 17:46:20 -0800, Junio C Hamano wrote: > > > $ git reflog sho > > shot show > > > > That is what I would expect. > > Thank you for responding. > > Of course that's the logical expectation. > > However I'm not sure if it is sensible to offer completion for > sub-commands mixed with branch names. > > Furthermore, I am also worried that such an approach implies making the > user pay, probably unnecessarily many times, for __git_complete_refs in > cases such as: > > $ git reflog ;# the user may be just exploring the sub-commands > $ git reflog s ;# the user may be lazy and just want "show " > $ git reflog show ;# likewise, to complete the SP > $ git reflog expir ;# how often a expir... branch is expected here? > > The experienced user, if not most users, should be intuitive enough to > circumvent the corner cases: > > $ git reflog > delete expire show > ... > $ git reflog s > ... > $ git reflog show s > ... > $ git reflog show shot > > This is why I choose to fallback to __git_complete_ref only when no > other option is available. > > If you think, or anyone else, that these concerns don't make sense, I'm > open to make it work as you described. I am happy with the current iteration and I still think that mixing branch names with options is a source of confusion. However, this topic in the latest 'What's cooking' is marked with: Expecting a reroll. cf. source: <98daf977-dbad-4d3b-a293-6a769895088f@gmail.com> I am confused about what the expectation is. Consider this message a ping as maybe the message I'm responding to has been missed. Thanks.