From: Jeff King Date: Thu, 15 Mar 2012 13:19:04 GMT Subject: Re: [PATCH 1/3] help: Fix help message for aliases Message-ID: <20120315131903.GA8467@sigill.intra.peff.net> In-Reply-To: <4F617AE2.9050700@lge.com> On Thu, Mar 15, 2012 at 02:15:14PM +0900, 김남형 wrote: > >What output does this produce for: > > > > $ git config alias.foo '!f() { git log $1@{u}..$1; }; f' > > $ git help foo > > > >? > > > > Oh, I didn't think of such a complicated case. Hmm, how about > checking whether the first word is a git command or not: > > printf("`git %s' is aliased to `%s%s'\n", argv[0], > is_git_command(first_word) ? "git " : "", alias); I think the right solution is to just look for "!", which is what tells git it is a shell command. -Peff