Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fish/conf.d/10-core.fish
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if test (uname) = Darwin
end
end
# Later entries end up first (fish_add_path --move prepends).
for tool_bin in /usr/local/bin /nix/var/nix/profiles/default/bin "$HOME/.nix-profile/bin" "$HOME/.bun/bin" "$HOME/.volta/bin" "$HOME/.opencode/bin" "$HOME/.local/bin" /opt/homebrew/sbin /opt/homebrew/bin "$HOME/.cargo/bin"
for tool_bin in "$HOME/.pi/agent/bin" /usr/local/bin /nix/var/nix/profiles/default/bin "$HOME/.nix-profile/bin" "$HOME/.bun/bin" "$HOME/.volta/bin" "$HOME/.opencode/bin" "$HOME/.local/bin" /opt/homebrew/sbin /opt/homebrew/bin "$HOME/.cargo/bin"
if test -d "$tool_bin"
fish_add_path --path --move "$tool_bin"
end
Expand All @@ -69,7 +69,7 @@ end
if test (uname) = Linux
# One list for every Linux host; each dir is added only if it exists.
# Later entries end up first (fish_add_path --move prepends).
for tool_bin in /usr/local/go/bin $HOME/.local/go-*/bin "$HOME/.bun/bin" "$HOME/.local/share/pnpm/bin" /nix/var/nix/profiles/default/bin "$HOME/.nix-profile/bin" "$HOME/.opencode/bin" "$HOME/.local/bin"
for tool_bin in "$HOME/.pi/agent/bin" /usr/local/go/bin $HOME/.local/go-*/bin "$HOME/.bun/bin" "$HOME/.local/share/pnpm/bin" /nix/var/nix/profiles/default/bin "$HOME/.nix-profile/bin" "$HOME/.opencode/bin" "$HOME/.local/bin"
if test -d "$tool_bin"
fish_add_path --path --move "$tool_bin"
end
Expand Down
8 changes: 4 additions & 4 deletions fish/tests/w8-linux-path.fish
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ printf '#!/bin/sh\necho Linux\n' >"$fake/uname"
chmod +x "$fake/uname"

# Prefixed with $home so the test never depends on the runner's real dirs.
set -l dirs .local/go-1.27.1/bin .bun/bin .local/share/pnpm/bin .nix-profile/bin .opencode/bin .local/bin
set -l dirs .pi/agent/bin .local/go-1.27.1/bin .bun/bin .local/share/pnpm/bin .nix-profile/bin .opencode/bin .local/bin
for d in $dirs
mkdir -p "$home/$d"
end
Expand All @@ -31,7 +31,7 @@ set -l out (env -i HOME="$home" PATH="$fake:/usr/bin:/bin" "$fish_bin" --no-conf
# fish_add_path --move prepends in loop order: the last listed dir ends first.
# Only entries under the fake HOME: system dirs like /nix differ per runner.
set -l ours (string join '|' (string match -- "$home/*" (string split '|' -- $out[1])))
set -l expected "$home/.local/bin|$home/.opencode/bin|$home/.nix-profile/bin|$home/.local/share/pnpm/bin|$home/.bun/bin|$home/.local/go-1.27.1/bin"
set -l expected "$home/.local/bin|$home/.opencode/bin|$home/.nix-profile/bin|$home/.local/share/pnpm/bin|$home/.bun/bin|$home/.local/go-1.27.1/bin|$home/.pi/agent/bin"
test "$ours" = "$expected"; or fail "Linux PATH order (expected $expected, got $ours)"
string match -q -- "$home/.local/bin|*" "$out[1]"; or fail "user-local bin must lead PATH ($out[1])"
test "$out[2]" = o=absent; or fail "Linux must not define the macOS open alias ($out[2])"
Expand All @@ -45,14 +45,14 @@ string match -q -- "*$bare*" "$out_bare[1]"; and fail "missing dirs were added t
# macOS: 10-core.fish owns PATH too (config.fish no longer edits it).
printf '#!/bin/sh\necho Darwin\n' >"$fake/uname"
set -l mac "$ws/mac"
set -l mac_dirs .cargo/bin .local/bin .opencode/bin .volta/bin .bun/bin .nix-profile/bin .gentle-ai/bin
set -l mac_dirs .pi/agent/bin .cargo/bin .local/bin .opencode/bin .volta/bin .bun/bin .nix-profile/bin .gentle-ai/bin
for d in $mac_dirs
mkdir -p "$mac/$d"
end
set -l out_mac (env -i HOME="$mac" PATH="$fake:/usr/bin:/bin" "$fish_bin" --no-config -c "$probe" "$core")
test "$out_mac[2]" = o=defined; or fail "macOS must define the open alias ($out_mac[2])"
set -l mac_ours (string join '|' (string match -- "$mac/*" (string split '|' -- $out_mac[1])))
set -l mac_expected "$mac/.gentle-ai/bin|$mac/.cargo/bin|$mac/.local/bin|$mac/.opencode/bin|$mac/.volta/bin|$mac/.bun/bin|$mac/.nix-profile/bin"
set -l mac_expected "$mac/.gentle-ai/bin|$mac/.cargo/bin|$mac/.local/bin|$mac/.opencode/bin|$mac/.volta/bin|$mac/.bun/bin|$mac/.nix-profile/bin|$mac/.pi/agent/bin"
test "$mac_ours" = "$mac_expected"; or fail "macOS PATH order (expected $mac_expected, got $mac_ours)"
string match -q -- "$mac/.gentle-ai/bin|*" "$out_mac[1]"; or fail "gentle-ai launchers must lead the macOS PATH ($out_mac[1])"

Expand Down
Loading