Re: git alias and --help
- From
Miles Bader <miles@gnu.org>
- Date
- Oct 28, 2011, 18:25 UTC
- Message-ID
- <CADCnXoaPbCK0B=XZwdAY=yEb61YhvyQ6FA=BAxkADJ6hra-_Lg@mail.gmail.com>
- In-Reply-To
- <7v62j9t2gj.fsf@alter.siamese.dyndns.org>
2011/10/29 Junio C Hamano <gitster@pobox.com>:
Show 9 quoted lines
> $ git lgf --help > 'git lgf' is aliased to 'log --oneline --boundary --first-parent' > > with "git log --help", but that is aiming too low for my taste. > > If you are redesigning the help system, isn't it a shame that you are > discarding other tokens in the alias when giving help? Wouldn't it be > wonderful if you extracted the option descriptions for these three options > specified and showing only that, for example?
I think that would be the wrong thing in most cases though: an alias like the above happily allows the user to specify other git-log options on the command line; when I get help on an aliased option, it's often precisely because I want to see the _other_ options I can use...
E.g., I have:
$ git slog --help `git slog' is aliased to `log --date=short --pretty=tformat:"%h %ad %s" --abbrev-commit'
But the typical question I want to answer is something like "OK, how do I reverse the output order of slog?" or "how do I limit the output of slog to a certain date range?"
-miles
-- Cat is power. Cat is peace.