Re: Shell aliases & paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]