[Haskell-cafe] Happy: PATH issue

Daniel Fischer daniel.is.fischer at web.de
Sun May 2 20:25:45 EDT 2010


On Montag 03 Mai 2010 02:12:20, Ivan Miljenovic wrote:
> On 3 May 2010 08:49, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> > Am Montag 03 Mai 2010 00:28:31 schrieb Ivan Lazar Miljenovic:
> >> bash expands it when you use it within bash, but when it's used
> >> within another program this might not be the case (since the PATH is
> >> just a String after all).
> >
> > But does that string contain any '~'s?
> > I think not (unless quoted).
> > I believe the string that is assigned to PATH is already expanded (if
> > you have
>
> I tried it:
<snip>
>
> whilst variables might get expanded, ~ isn't.

It is by my bash:

dafis at linux-mkk1:~/Haskell> export DUMMY=~/bin:~/.cabal
dafis at linux-mkk1:~/Haskell> echo $DUMMY
/home/dafis/bin:/home/dafis/.cabal
dafis at linux-mkk1:~/Haskell> printenv DUMMY
/home/dafis/bin:/home/dafis/.cabal
dafis at linux-mkk1:~/Haskell> ghc -e 'System.Environment.getEnv "DUMMY"'
"/home/dafis/bin:/home/dafis/.cabal"
dafis at linux-mkk1:~/Haskell> bash --version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

Apparently, it's version-dependent (unsurprisingly).
What's your shell?


More information about the Haskell-Cafe mailing list