From: Jonathan Nieder <jrnieder@gmail.com>
To: Eli Barzilay <eli@barzilay.org>
Cc: git@vger.kernel.org
Subject: Re: Shell aliases & paths
Date: Tue, 4 May 2010 16:11:22 -0500 [thread overview]
Message-ID: <20100504211122.GA15091@progeny.tock> (raw)
In-Reply-To: <19424.34226.564684.613674@winooski.ccs.neu.edu>
Eli Barzilay wrote:
> AFAICT, a shell command alias (one that starts with a "!") is executed
> from the repository root, but to make things worse it looks like there
> is no way to tell which directory it was executed from. If this is
> correct, then these aliases are useless for anything that need to
> accept relative paths. Is there something obvious that I'm missing?
Not that I can see. Maybe a new GIT_PATHNAME_PREFIX environment variable
would help.
If we were starting from scratch, it might be nice to make aliases
suppress the chdir to toplevel. Unfortunately, that would probably
break some existing aliases. Another possibility would be to use some
alternative convention (like [alias] foo = "# bar") to suppress the
repository search. At that point, why not just add a git-foo script
to $PATH? (‘git foo’ will still call it.)
Hope that helps,
Jonathan
next prev parent reply other threads:[~2010-05-04 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 20:38 Shell aliases & paths Eli Barzilay
2010-05-04 21:11 ` Jonathan Nieder [this message]
2010-05-04 21:22 ` Eli Barzilay
2010-05-04 22:30 ` Jonathan Nieder
2010-05-04 23:20 ` Eli Barzilay
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=20100504211122.GA15091@progeny.tock \
--to=jrnieder@gmail.com \
--cc=eli@barzilay.org \
--cc=git@vger.kernel.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).