Files
dotfiles/config/fish/conf.d/02-ssh-auth-sock.fish
T
gitadmin 98f809dfe5 refactor(shell): modularize shell config into per-shell profiles and conf.d
Split bash config into dedicated aliases and profile files. Extract
fish shell init from config.fish into composable conf.d fragments
(setup, environment, ssh-auth-sock). Remove the generic profile in
favor of the bash-specific one. Add a static SSH_AUTH_SOCK symlink
so tmux sessions always see the current socket regardless of which
shell spawned them.
2026-07-24 14:53:30 -04:00

10 lines
455 B
Fish

# Create a predictable symlink to the current SSH auth socket.
# tmux forces SSH_AUTH_SOCK to ~/.ssh/ssh_auth_sock globally
# (see config/tmux/tmux.conf), so this symlink must exist for every
# interactive shell -- not just bash login shells.
set -l auth_sock "$HOME/.ssh/ssh_auth_sock"
if set -q SSH_AUTH_SOCK; and test "$SSH_AUTH_SOCK" != "$auth_sock"; and test -S "$SSH_AUTH_SOCK"
mkdir -p "$HOME/.ssh"
ln -sf "$SSH_AUTH_SOCK" "$auth_sock"
end