io.standard-paths: fix standard-login-paths for fish shell
Fish shell automatically split variables whose name ends in "PATH" into lists, and uses space as separator for output Colons force fish to use standard $PATH representationmaster
parent
413cc49d3b
commit
4353b05cf1
|
@ -14,3 +14,8 @@ sequences tools.test ;
|
||||||
{ "/bin/ps" "/sbin/ps" "/usr/bin/ps" } member?
|
{ "/bin/ps" "/sbin/ps" "/usr/bin/ps" } member?
|
||||||
] with-os-env
|
] with-os-env
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
{ t } [
|
||||||
|
"ls" find-in-standard-login-path
|
||||||
|
{ "/bin/ls" "/usr/bin/ls" } member?
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -16,7 +16,7 @@ M: unix find-in-path*
|
||||||
utf8 decode [ blank? ] trim ":" split ;
|
utf8 decode [ blank? ] trim ":" split ;
|
||||||
|
|
||||||
: standard-login-paths ( -- strings )
|
: standard-login-paths ( -- strings )
|
||||||
{ "-l" "-c" "echo $PATH" }
|
{ "-l" "-c" "echo \"$PATH\"" }
|
||||||
effective-user-id user-passwd shell>> prefix
|
effective-user-id user-passwd shell>> prefix
|
||||||
binary <process-reader> stream-contents parse-login-paths ;
|
binary <process-reader> stream-contents parse-login-paths ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue