Some fish shell configuration changes
This commit is contained in:
12
terminal/fish/functions/is_ssh_agent_running.fish
Normal file
12
terminal/fish/functions/is_ssh_agent_running.fish
Normal file
@@ -0,0 +1,12 @@
|
||||
function is_ssh_agent_running
|
||||
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"
|
||||
return 1
|
||||
end
|
||||
|
||||
ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent
|
||||
return $status
|
||||
end
|
||||
Reference in New Issue
Block a user