Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
101ea872
Commit
101ea872
authored
Sep 08, 2019
by
Marc Cornellà
Browse files
ssh-agent: check if `ssh-add -l` was successful
parent
c44569f0
Changes
1
Show whitespace changes
Inline
Side-by-side
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
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