git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Gelonida N <gelonida@gmail.com>,
	git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>
Subject: Re: git alias and --help
Date: Fri, 28 Oct 2011 06:26:04 -0700 (PDT)	[thread overview]
Message-ID: <m362j95jv3.fsf@localhost.localdomain> (raw)
In-Reply-To: <buoty6t9937.fsf@dhlpc061.dev.necel.com>

Miles Bader <miles@gnu.org> writes:
> Junio C Hamano <gitster@pobox.com> writes:

> > > > git branch --help
> > >
> > > How about "git help branch"?
> >
> > The reason why we do not do what you seem to be suggesting is because
> > giving the same behaviour to "git b --help" as "git branch --help" is
> > wrong.
> 
> I agree with Gelonida's followup:  although what you say makes sense,
> it's still pretty annoying behavior for the very common case of a
> simple renaming alias...
> 
> E.g., I have "co" aliased to "checkout", and so my fingers are very
> very inclined to say "co" when I mean checkout... including when
> asking for help.  I actually end up typing "git co --help", grumbling,
> and retyping with the full command name, quite reguarly.
> 
> What I've often wished is that git's help system would output
> something like:
> 
>    $ git help co
>    `git co' is aliased to `checkout'
> 
>    Here's the help entry for `checkout':
> 
>    GIT-CHECKOUT(1)                   Git Manual                   GIT-CHECKOUT(1)

Wouldn't it be more useful to say something like this:

  $ git co --help
  `git co' is aliased to `checkout'
 
  You can see help entry for `checkout' with "git checkout --help"

Then help is only copy'n'paste away.  

(This helping text probably should be controlled by some advice.*
config variable).


P.S. I wonder if allowing to run command if you specify unambiguous
prefix would be a good replacement for such aliases?

-- 
Jakub Narębski

  parent reply	other threads:[~2011-10-28 13:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27 22:20 git alias and --help Gelonida N
2011-10-27 22:28 ` Junio C Hamano
2011-10-27 22:50   ` Junio C Hamano
2011-10-28  0:24     ` Gelonida N
2011-10-28  1:51     ` Miles Bader
2011-10-28  4:05       ` Junio C Hamano
2011-10-28  9:00         ` Michael J Gruber
2011-10-28  9:17         ` Gelonida N
2011-10-28 13:27           ` Jakub Narebski
2011-10-28 20:21             ` Gelonida N
2011-10-28 13:26       ` Jakub Narebski [this message]
2011-10-28 18:07         ` Junio C Hamano
2011-10-28 18:25           ` Miles Bader
2011-10-28 20:23         ` Gelonida N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m362j95jv3.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=gelonida@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).