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 representation
{ "/bin/ps" "/sbin/ps" "/usr/bin/ps" } member?
] with-os-env
] unit-test
+
+{ t } [
+ "ls" find-in-standard-login-path
+ { "/bin/ls" "/usr/bin/ls" } member?
+] unit-test
utf8 decode [ blank? ] trim ":" split ;
: standard-login-paths ( -- strings )
- { "-l" "-c" "echo $PATH" }
+ { "-l" "-c" "echo \"$PATH\"" }
effective-user-id user-passwd shell>> prefix
binary <process-reader> stream-contents parse-login-paths ;