git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eugene Sajine <euguess@gmail.com>,
	Ralf Thielow <ralf.thielow@gmail.com>, git <git@vger.kernel.org>,
	Andrew Ardill <andrew.ardill@gmail.com>
Subject: Re: Help creating git alias
Date: Thu, 31 Oct 2013 11:15:10 -0700	[thread overview]
Message-ID: <20131031181509.GB39079@gmail.com> (raw)
In-Reply-To: <xmqqd2ml8gbs.fsf@gitster.dls.corp.google.com>

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.
-- 
David

  reply	other threads:[~2013-10-31 18:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 19:34 Help creating git alias Eugene Sajine
2013-10-30 19:47 ` Andrew Ardill
2013-10-30 19:53   ` Eugene Sajine
2013-10-30 19:57 ` Ralf Thielow
2013-10-30 20:10   ` Eugene Sajine
2013-10-30 21:02     ` Junio C Hamano
2013-10-31  1:26       ` Eugene Sajine
2013-10-31  3:54         ` Junio C Hamano
2013-10-31 15:36           ` Eugene Sajine
2013-10-31 17:40             ` David Aguilar
2013-10-31 18:07               ` Junio C Hamano
2013-10-31 18:15                 ` David Aguilar [this message]
2013-10-31 19:31                   ` Eugene Sajine
2013-10-31 19:41                     ` Junio C Hamano
2013-10-31 20:06                       ` Eugene Sajine

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=20131031181509.GB39079@gmail.com \
    --to=davvid@gmail.com \
    --cc=andrew.ardill@gmail.com \
    --cc=euguess@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ralf.thielow@gmail.com \
    /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).