
On 3 May 2010 08:49, Daniel Fischer
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: ivanm@feitpc02 ~ $echo $PATH ~/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/home/ivanm/ghc/bin/:/usr/bin/:/home/ivanm/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/home/ivanm/ghc/bin/:/usr/bin/:/home/ivanm/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/usr/bin/:/home/ivanm/ghc/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games ivanm@feitpc02 ~ $ghc -e 'System.Environment.getEnv "PATH"' "~/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/home/ivanm/ghc/bin/:/usr/bin/:/home/ivanm/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/home/ivanm/ghc/bin/:/usr/bin/:/home/ivanm/tools/bin/:/home/ivanm/emacs/bin/:/home/ivanm/.cabal/bin/:/usr/bin/:/home/ivanm/ghc/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" whilst variables might get expanded, ~ isn't. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com