SSH agent initialization for Fish
Automatically initialize and load SSH agent identities.
Based on code I used in my zsh configuration files. Originally based on code
from Joseph M. Reagle (originally identified below, found in numerous places
across the web). http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html
Agent forwarding support is pulled from Oh My Zsh and is based on ideas from
Florent Thoumie and Jonas Pfenniger.
This version always assumes that there will be tmux agent forwarding, and
unlike the zsh version does not permit the specification of identities to add
to the agent; all identities with a .pub
extension in ${HOME}/.ssh
will be
loaded at all times.
The final call to add SSH identities to ssh-agent can be modified by setting$halostatue_fish_ssh_agent_flags
. If not specified, defaults to
a platform-specific value:
-q -A -K
, which means that non-error output is-q
.[]
Install with Fisher (recommended):
# Fisher v3.x
fisher add halostatue/fish-ssh-agent
# Fisher v4.x: Dependencies must be specified explicitly.
fisher install halostatue/fish-ssh-agent
conf.d/*.fish
to your fish configuration directory preserving the[fish shell]: https://fishshell.com ‘friendly interactive shell’