Clemens Buchacher <drizzd@xxxxxx> writes: > On Mon, Feb 13, 2012 at 01:20:25PM -0800, Junio C Hamano wrote: >> Clemens Buchacher <drizzd@xxxxxx> writes: >> >> >> Erm,... do you really need the alias if you add git-p4 in a directory on >> >> your $PATH? >> > >> > With recent git versions, this has stopped working. >> >> Erm, I am confused. > > Looks like in my case it did not work because I had a PATH entry with a > '~' in it. It probably stopped working for me because I moved some > executables around. > > It's not a regression (I just tried with 1.6.0 and I get the same > result). And dash does not apply tilde expansion to PATH either. I do not think tilde in $PATH is expanded by exec*p family to begin with, so it is not "dash" but POSIX, I would think. It is bash that is harming other programs, by trying to be more helpful, encouraging this user mistake to add ~ literally on the PATH. You can see it in action below. $ cd /var/tmp $ cat >execlptest.c <<\EOF #include <unistd.h> #include <errno.h> #include <string.h> #include <stdio.h> int main(int ac, const char **av) { int status = execlp("xyzzy", "xyzzy", NULL); printf("execlp returned %d (errno = %d, %s)\n", status, errno, strerror(errno)); return 0; } EOF $ gcc -o execlptest execlptest.c $ cat >/home/junio/junk/xyzzy <<\EOF #!/bin/sh exec lp test EOF $ chmod +x /home/junio/junk/xyzzy $ PATH=/usr/bin:/bin $ export PATH $ /var/tmp/execlptest execlp returned -1 (errno = 2, No such file or directory) : notice the sq pair around the value on the next line $ PATH='/usr/bin:/bin:~/junk'; export PATH; echo "$PATH" /usr/bin:/bin:~/junk $ /var/tmp/execlptest execlp returned -1 (errno = 2, No such file or directory) $ xyzzy exec lp test $ echo $BASH_VERSION 4.1.5(1)-release -- 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