Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
101ea872
Commit
101ea872
authored
Sep 08, 2019
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssh-agent: check if `ssh-add -l` was successful
parent
c44569f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ssh-agent.plugin.zsh
plugins/ssh-agent/ssh-agent.plugin.zsh
+7
-5
No files found.
plugins/ssh-agent/ssh-agent.plugin.zsh
View file @
101ea872
...
...
@@ -12,7 +12,7 @@ function _start_agent() {
}
function
_add_identities
()
{
local id
line sig
local id
line sig
lines
local
-a
identities loaded_sigs loaded_ids not_loaded
zstyle
-a
:omz:plugins:ssh-agent identities identities
...
...
@@ -32,10 +32,12 @@ function _add_identities() {
fi
# get list of loaded identities' signatures and filenames
for
line
in
${
(f)
"
$(
ssh-add
-l
)
"
}
;
do
loaded_sigs+
=
${${
(z)line
}
[2]
}
loaded_ids+
=
${${
(z)line
}
[3]
}
done
if
lines
=
$(
ssh-add
-l
)
;
then
for
line
in
${
(f)lines
}
;
do
loaded_sigs+
=
${${
(z)line
}
[2]
}
loaded_ids+
=
${${
(z)line
}
[3]
}
done
fi
# add identities if not already loaded
for
id
in
$identities
;
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment