2026-01-28 17:46:39 +00:00
|
|
|
if status is-interactive
|
|
|
|
|
# Fix for terminals without terminfo on server (e.g., Ghostty)
|
|
|
|
|
if not test -e /usr/share/terminfo/$TERM[1]/$TERM
|
|
|
|
|
set -gx TERM xterm-256color
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Disable OSC 133 shell integration
|
|
|
|
|
functions -e __fish_on_interactive_startup_done
|
|
|
|
|
functions -e __fish_prompt_initialized
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Clear screen AND scrollback with Ctrl+L
|
|
|
|
|
bind \cl 'printf "\e[2J\e[3J\e[H"; commandline -f repaint'
|
|
|
|
|
|
|
|
|
|
# PATH setup
|
|
|
|
|
fish_add_path -g ~/.local/bin
|
|
|
|
|
|
2026-01-29 20:06:38 +00:00
|
|
|
# Cargo/Rust
|
|
|
|
|
if test -d ~/.cargo/bin
|
|
|
|
|
fish_add_path -g ~/.cargo/bin
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# fnm (Fast Node Manager)
|
|
|
|
|
if test -d ~/.local/share/fnm
|
|
|
|
|
fish_add_path -g ~/.local/share/fnm
|
|
|
|
|
fnm env | source
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# pipx
|
|
|
|
|
if test -d ~/.local/bin
|
|
|
|
|
fish_add_path -g ~/.local/bin
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
{{- if eq .pkgManager "brew" }}
|
2026-01-28 17:46:39 +00:00
|
|
|
# macOS-specific: Homebrew paths
|
|
|
|
|
fish_add_path -g /opt/homebrew/bin
|
|
|
|
|
fish_add_path -g /opt/homebrew/sbin
|
2026-01-28 18:33:08 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
2026-01-29 20:06:38 +00:00
|
|
|
{{- if .hasGUI }}
|
2026-01-28 18:33:08 +00:00
|
|
|
# SSH agent socket (systemd user service on Linux, launchd on macOS)
|
2026-01-29 20:06:38 +00:00
|
|
|
{{- if eq .pkgManager "pacman" }}
|
2026-01-28 18:28:33 +00:00
|
|
|
set -gx SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket
|
2026-01-29 20:06:38 +00:00
|
|
|
{{- else if eq .pkgManager "brew" }}
|
|
|
|
|
set -gx SSH_AUTH_SOCK ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
|
|
|
|
|
{{- end }}
|
2026-01-28 17:46:39 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
2026-01-29 20:06:38 +00:00
|
|
|
{{- if not .hasGUI }}
|
|
|
|
|
# Server-specific: SSH key caching
|
2026-01-28 18:23:51 +00:00
|
|
|
keychain --eval --quiet id_ed25519 | source
|
2026-01-29 20:06:38 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
|
|
{{- if eq .pkgManager "apt" }}
|
|
|
|
|
# Debian/Ubuntu: Helix runtime path (installed from GitHub releases)
|
|
|
|
|
if test -d /usr/local/lib/helix-*/runtime
|
|
|
|
|
set -gx HELIX_RUNTIME (ls -d /usr/local/lib/helix-*/runtime | head -1)
|
|
|
|
|
end
|
2026-01-28 17:46:39 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
|
|
# GPG TTY for signing
|
|
|
|
|
set -gx GPG_TTY (tty)
|
|
|
|
|
|
|
|
|
|
# Editor
|
|
|
|
|
set -gx EDITOR {{ .editor }}
|
|
|
|
|
set -gx VISUAL {{ .editor }}
|
2026-01-29 20:27:35 +00:00
|
|
|
|
|
|
|
|
# Go module cache (keep ~/go clean)
|
|
|
|
|
set -gx GOMODCACHE ~/.cache/go/mod
|