On Montag 03 Mai 2010 02:12:20, Ivan Miljenovic wrote:
> On 3 May 2010 08:49, Daniel Fischer <[email protected]> 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:

da...@linux-mkk1:~/Haskell> export DUMMY=~/bin:~/.cabal
da...@linux-mkk1:~/Haskell> echo $DUMMY
/home/dafis/bin:/home/dafis/.cabal
da...@linux-mkk1:~/Haskell> printenv DUMMY
/home/dafis/bin:/home/dafis/.cabal
da...@linux-mkk1:~/Haskell> ghc -e 'System.Environment.getEnv "DUMMY"'
"/home/dafis/bin:/home/dafis/.cabal"
da...@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?
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to