RFC: Shell Aliases and Arguments

Isaac Jurado diptongo at gmail.com
Sun Aug 22 16:41:09 CDT 2010


Replying Steve Losh:
>
> This is not a new concept -- you can already do this with vanilla
> Mercurial 1.6 (and probably earlier) using hooks:
> [...]
> These shell alias patches just make it easier to create these aliases.
> They don't add any new concepts/functionality to the hgrc file.

You got me on that one.  I completely forgot about hooks, that's because
I haven't used them yet.  Now it makes more sense, thanks for the
clarification.

> You could of course make an 'hgqempty' script and put it on your path.
> That works, but it's less than ideal:
>
> * It pollutes the tab completion namespace.
> * When you want to run an alias/script you now need to think "Did I
>   define that as an alias (hg qempty) or a script (hgqempty)?"
> * It's yet another file to keep synced to all the machines you work on
>   (not a huge deal, since it could live with the rest of your
>   dotfiles).
>
> Defining qempty as an alias avoids these problems.

I was already aware of those.  You can also add to the list the fact
that aliases are detected by the various shell programmable completion
becuse hg lists them as commands.  However I didn't find them important
enough to add dedicated functionality.  Having it already implemented
changes the scenario considerably.

Well, sorry for posting this in -dev.

-- 
Isaac Jurado

"The noblest pleasure is the joy of understanding."
                                  Leonardo da Vinci


More information about the Mercurial-devel mailing list