From 93ba6231f35882a9b94214a8568ec2a5b210f2e8 Mon Sep 17 00:00:00 2001 From: Grégoire Duchêne Date: Sat, 13 Nov 2021 13:59:23 +0000 Subject: zsh/op-ssh-add: Use ‘command’ to avoid subshells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/functions/op-ssh-add | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zsh/functions') diff --git a/zsh/functions/op-ssh-add b/zsh/functions/op-ssh-add index a6633bf..4644349 100644 --- a/zsh/functions/op-ssh-add +++ b/zsh/functions/op-ssh-add @@ -12,7 +12,7 @@ # You must also have the 1Password CLI tool (op) and jq installed. if [[ ${@[1]} =~ '-[DdKLlTXx]' ]]; then - $(which -p ssh-add) $@ + command ssh-add $@ return $? fi @@ -29,7 +29,7 @@ for prv (${@[-1]} ~/.ssh/id_{ecdsa,ed25519}{_sk,}); do done if [[ -z ${pub} ]]; then - $(which -p ssh-add) $@ + command ssh-add $@ return $? fi @@ -39,7 +39,7 @@ if [[ -z ${session} ]]; then fi zmodload zsh/zpty -zpty ssh $(which -p ssh-add) ${args} +zpty ssh command ssh-add ${args} _cleanup() { zpty -d ssh -- cgit v1.2.3-70-g09d2