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 # 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" }} # macOS-specific: Homebrew paths fish_add_path -g /opt/homebrew/bin fish_add_path -g /opt/homebrew/sbin {{- end }} {{- if .hasGUI }} # SSH agent socket (systemd user service on Linux, launchd on macOS) {{- if eq .pkgManager "pacman" }} set -gx SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket {{- else if eq .pkgManager "brew" }} set -gx SSH_AUTH_SOCK ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock {{- end }} {{- end }} {{- if not .hasGUI }} # Server-specific: SSH key caching keychain --eval --quiet id_ed25519 | source {{- 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 {{- end }} # GPG TTY for signing set -gx GPG_TTY (tty) # Editor set -gx EDITOR {{ .editor }} set -gx VISUAL {{ .editor }} # Go module cache (keep ~/go clean) set -gx GOMODCACHE ~/.cache/go/mod