[PATCH 2 of 2 RFC] dispatch: look up command by [<space>:]<cmdname> syntax (PoC)

Yuya Nishihara yuya at tcha.org
Sat Feb 24 21:37:12 EST 2018


On Sat, 24 Feb 2018 18:03:49 -0800, Gregory Szorc wrote:
> On Sat, Feb 24, 2018 at 5:42 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> > On Sat, 24 Feb 2018 11:39:26 -0800, Gregory Szorc wrote:
> > > I will say that I believe we had general consensus at a previous sprint
> > to
> > > implement proper support for sub-commands. This would allow us to
> > implement
> > > arguments on individual show views. e.g. `hg show work --maxage 14d`. It
> > > could also be useful for commands like bookmarks and topics, which try to
> > > shoehorn lots of functionality into a single command. From a UX
> > > perspective, I think explicit verbs are better than dash prefixed
> > arguments
> > > for controlling mode of operation. e.g. `hg bookmark delete foo`
> > (possibly
> > > bad example due to BC concerns).
> > >
> > > If this is the direction we want to go in, I'd be hesitant to implement
> > > [alias] support unless we're sure it would be compatible with proper
> > > sub-commands.
> >
> > Ah, okay, I didn't know the sub-command thingy. Let's revisit after that.
> > I don't wanna make the dispatcher more complicated.
> >
> 
> Well, nobody is actively working on sub-commands. So if you see a way to
> make this aliasing thing work such that it is forward compatible with
> sub-commands, then my vote is to do it.

I have no idea how sub-commands will be handled internally. I think sub-commands
and alias-bypass are orthogonal feature, but they may have some conflicts at
syntax level.


More information about the Mercurial-devel mailing list