Compare commits

..

2 Commits

Author SHA1 Message Date
Elijah Lynn
1d1d5d5737 Merge 23aa4458a3 into fd70a2afdd 2021-07-13 09:13:43 -07:00
Elijah Lynn
23aa4458a3 Use correct ssh-agent command in readme. 2021-07-13 09:13:36 -07:00
2 changed files with 3 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
Utility functions to start your ssh agent when using fish shell.
You will only need to run `ssh-add` and type your password once,
after the running ssh_agent should do the work for you.
after that, running `ssh-agent` should do the work for you.
## Installation

View File

@@ -1,18 +1,9 @@
function __ssh_agent_is_started -d "check if ssh agent is already started"
if test -n "$SSH_CONNECTION"
# This is an SSH session
ssh-add -l > /dev/null 2>&1
if test $status -eq 0 -o $status -eq 1
# An SSH agent was forwarded
return 0
end
end
if begin; test -f "$SSH_ENV"; and test -z "$SSH_AGENT_PID"; end
if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end
source $SSH_ENV > /dev/null
end
if test -z "$SSH_AGENT_PID"
if begin; test -z "$SSH_AGENT_PID"; and test -z "$SSH_CONNECTION"; end
return 1
end