* Why isn't $PATH expanded internally?
@ 2007-09-16 20:41 Richard Hartmann
2007-09-16 22:28 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Richard Hartmann @ 2007-09-16 20:41 UTC (permalink / raw)
To: zsh users
Hi all,
I am wondering why putting
~/foo
$HOME/foo # as in the string $HOME
into $PATH will not work as expected.
I am rather certain this is not oversight, but I am interested
in the rationale. Is it security reasons (although that seems
strange), execution speed (could be addressed by expanding
on load, but that would reduce functionality) or anything I can
not think of, atm?
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Why isn't $PATH expanded internally?
2007-09-16 20:41 Why isn't $PATH expanded internally? Richard Hartmann
@ 2007-09-16 22:28 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2007-09-16 22:28 UTC (permalink / raw)
To: zsh users
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-17 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-16 20:41 Why isn't $PATH expanded internally? Richard Hartmann
2007-09-16 22:28 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).