mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +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.
|
||||
for file in "$HOME/.ssh"/*; do
|
||||
# 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.
|
||||
identities+=("${file##*/}")
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue