dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* % in $PATH
@ 2014-11-05 11:59 Stephane Chazelas
  2014-11-10 13:20 ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Stephane Chazelas @ 2014-11-05 11:59 UTC (permalink / raw)
  To: dash

Hello,

ash/dash have a nice feature that allows to have:

PATH=/bin:%builtin:/usr/bin:/some/dir%func:/sbin

To have commands in /bin take precedence over builtins and
files in /some/dir being looked up for autoloaded functions (a
bit like FPATH in ksh/zsh).

That's nice but the way it is implemented, that means that %
characters in $PATH cause problems. See for instance:

http://unix.stackexchange.com/questions/126955/percent-in-path-environment-variable

Where someone ran into it when they had a:

/home/torbjorr/deployed/vector/x86_64-GNU%2fLinux directory in
there.

Given than only "builtin" and "func" are recognised after "%", I
think it would be better if the PATH handling accepted any other
string like "foo%bar", "foo%2f", "foo%functions" as-is as a
normal $PATH component.

And foo%2fbar%func meaning "foo%2fbar" treated as a directory
with autoloadable functions.

-- 
Stephane


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-10 23:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05 11:59 % in $PATH Stephane Chazelas
2014-11-10 13:20 ` Herbert Xu
2014-11-10 21:30   ` Stephane Chazelas
2014-11-10 21:59     ` Guido Berhoerster
2014-11-10 22:23       ` Stephane Chazelas
2014-11-10 22:39         ` Guido Berhoerster
2014-11-10 23:15           ` Stephane Chazelas

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).