Re: Help creating git alias
- From
- Eugene Sajine <euguess@gmail.com>
- Date
- Oct 31, 2013, 19:31 UTC
- Message-ID
- <CAPZPVFYWf3_xtxKkdw4_gzqKagVsbNvj73cb=RvX1Zm0C1h8pQ@mail.gmail.com>
- In-Reply-To
- <20131031181509.GB39079@gmail.com>
On Thu, Oct 31, 2013 at 2:15 PM, David Aguilar <davvid@gmail.com> wrote:
Show 17 quoted lines
> On Thu, Oct 31, 2013 at 11:07:19AM -0700, Junio C Hamano wrote:
>> David Aguilar <davvid@gmail.com> writes:
>>
>> > A-ha.. I think adding the chdir to alias is possible using a function.
>>
>> You do not have to use a function to do so, no?
>
> Right, of course.
>
> So something like:
>
> [alias]
> example = "!cd ${GIT_PREFIX:-.} && git log \"$@\""
>
> should do the trick.
> --
> DavidAwesome! It does work! One note: i tried the ${GIT_PREFIX:-.} and ${GIT_PREFIX} and it seems to give the same results. What is the expected difference here?
Thank you!