mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Update plugins/ssh-agent/ssh-agent.plugin.zsh
This commit is contained in:
parent
2e746384bf
commit
8c60c2ddb7
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ function _add_identities() {
|
||||||
# Iterate over files in .ssh folder.
|
# Iterate over files in .ssh folder.
|
||||||
for file in "$HOME/.ssh"/*; do
|
for file in "$HOME/.ssh"/*; do
|
||||||
# Check if file is a regular file and starts with "-----BEGIN OPENSSH PRIVATE KEY-----".
|
# Check if file is a regular file and starts with "-----BEGIN OPENSSH PRIVATE KEY-----".
|
||||||
if [[ -f "$file" && $(head -n 1 "$file") =~ ^-----BEGIN\ OPENSSH\ PRIVATE\ KEY----- ]]; then
|
if [[ -f "$file" && $(command head -n 1 "$file") =~ ^-----BEGIN\ OPENSSH\ PRIVATE\ KEY----- ]]; then
|
||||||
# Add filename (without path) to identities array.
|
# Add filename (without path) to identities array.
|
||||||
identities+=("${file##*/}")
|
identities+=("${file##*/}")
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue