fish-shell/tests/checks/default-setup-path.fish
2023-09-05 11:38:59 +02:00

11 lines
465 B
Fish

#RUN: %fish -C 'set -g fish %fish' %s
# FIXME: Rationalize behavior when PATH is explicitly unset, should this not behave like PATH=""?
# "" is threated like ".", see https://github.com/fish-shell/fish-shell/issues/3914
if command -q getconf
env -u PATH $fish -c 'test "$PATH" = "$('(command -s getconf)' PATH)"; and echo Success'
else
# this is DEFAULT_PATH
env -u PATH $fish -c 'test "$PATH" = "/usr/bin:/bin"; and echo Success'
end
# CHECK: Success