From 8c60c2ddb7a38138d463cbd20698169a5c0c7e25 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Thu, 10 Oct 2024 13:38:48 +0200 Subject: [PATCH] Update plugins/ssh-agent/ssh-agent.plugin.zsh --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 7b4a5ff34..becd5ea17 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -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