Re: Collection of stgit issues and wishes
- From
Karl Hasselström <kha@treskal.com>
- Date
- Dec 13, 2006, 11:03 UTC
- Message-ID
- <20061213110314.GA22670@diana.vm.bytemark.co.uk>
- In-Reply-To
- <457FD3E4.3090104@op5.se>
On 2006-12-13 11:20:20 +0100, Andreas Ericsson wrote:
Show 23 quoted lines
> David Kågedal wrote: > > > "Catalin Marinas" <catalin.marinas@gmail.com> writes: > > > > > On 08/12/06, Yann Dirson <ydirson@altern.org> wrote: > > > > > > > - shortcuts (st -> status, etc.), possibly making use of the > > > > git alias system ? > > > > > > Did this last night as it was pretty easy and without the GIT > > > alias system (which I am not familiar with). The idea is that if > > > it cannot find an exact match, it tries to look for all the > > > commands starting with the passed argument. If more than one > > > command is found, it reports an "ambiguous command". > > > > That approach can cause problems later on. If "stgit st" is > > currently a unique prefix of "stgit status", people might use it > > in scripts. Then, one day, you add the "stgit store" command, or > > whatever, and their scripts start breaking for no good reason. > > People who use abbreviations of commands in scripts ought to be > shot, not catered to, especially if they know this abbreviation is > automagically calculated.
Well, yes, but there's no reason to not shoot them _politely_ ...
I'd prefer hand-picked command abbreviations to reduce namespace clutter. That way, it's even possible to have "ambiguous" shortcuts -- for example, "stg st" -> "stg status" even if "stg store" exists. And shortcuts that aren't prefixes, like "stg ua" -> "stg unapplied". And the user doesn't need to retrain her fingers just because a prefix gets ambiguous.
For prefixes, tab completion is a much better answer.
-- Karl Hasselström, kha@treskal.com