File: default-setup-path.fish

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (16 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#RUN: fish=%fish %fish %s

if command -q getconf
    # (no env -u, some systems don't support that)
    set -l getconf (command -s getconf)
    set -e PATH
    $fish -c 'test "$PATH" = "$('"$getconf"' PATH)"; and echo Success'
else
    # this is DEFAULT_PATH
    # the first element (usually `/usr/local/bin`) depends on PREFIX set in CMake, so we ignore it
    set -e PATH
    $fish -c 'test "$PATH[2..]" = "/usr/bin:/bin"; and echo Success'
end
# CHECK: Success

# Note: $PATH is now busted, I suggest abandoning this file.