This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Jul 30, 2010 at 10:15:40AM -0400, Arnaud Lacombe wrote: > On Fri, Jul 30, 2010 at 6:35 AM, Johannes Stezenbach <js@sig21.net> wrote: > > On Thu, Jul 29, 2010 at 09:29:37PM -0400, Arnaud Lacombe wrote: > > > >> Why not only accepting absolute directory or directory starting with "~": > >> > >> test -n "${var}" -a -z "${var%%[~/]*}" && new=... > >> > >> should do the job. > > > > I agree this is more straight forward. ?I like it. > > (However I wonder if ~ is valid in PATH? I think the shell will > > expand ~ when you set PATH, but execvp() would not?) > > > I just tested, sh will not do any expansion (even when the variable is > set), and the lookup will fail, so "~" in PATH is not valid. It can be > removed from the test :) I just tested, too. It seems bash supports "~" in PATH, probably because it does not simply call execvp(). But Debian dash does not. Another great source of confusion if your login bash finds other binaries than scripts using /bin/sh... I'll send a new patch in a minute. Thanks Johannes -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |