Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Why isn't $PATH expanded internally?



On Sep 16, 10:41pm, Richard Hartmann wrote:
}
} I am wondering why putting
} 
} ~/foo
} $HOME/foo # as in the string $HOME
} 
} into $PATH will not work as expected.

$PATH is just a symbolic name for a string in the process environment.
This environment is passed along verbatim to every program forked by
the shell; the PATH value is not merely used internally for searches
by the shell itself.

Incidentally ~/foo and $HOME/foo *are* normally expanded "on load" when
included in a PATH=.... assigment.  If it's not working for you, it is
most likely because of quoting that you've applied to the value.



Messages sorted by: Reverse Date, Date, Thread, Author