[Haskell-cafe] Happy: PATH issue

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun May 2 19:24:24 EDT 2010

On May 2, 2010, at 18:21 , Daniel Fischer wrote:
>> Additionally, some shells only expand "~" at the beginning of a
>> "word", so if you `export PATH=~/foo:~/bar' the second "~" won't be
>> expanded.  (bash will expand it after a colon, so that should work.)
> Do you perchance know which shells would expand only the first tilde?

Older zsh when MAGIC_EQUAL_SUBST isn't set.  zsh 4.x handles "export"  
and some other builtins automatically, but MAGIC_EQUAL_SUBST is still  
needed in some cases, such as the occasionally suggested `echo  
PATH=... >>.profile'.

>> A way to check this:  type `env PATH'.
> Shouldn't that be

It was supposed to be "printenv".  *sigh*

>> If the result contains a "~",
>> you need to look at how you're setting PATH to make sure "~" isn't
>> being quoted.
> If the result contains a tilde, you're already hosed because
> System.Directory.findExecutable doesn't do tilde-expansion before  
> calling
> doesFileExist.

Er, that's the point.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100502/897cd76c/PGP.bin

More information about the Haskell-Cafe mailing list