diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-11-13 13:59:23 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-11-13 13:59:23 +0000 |
| commit | 93ba6231f35882a9b94214a8568ec2a5b210f2e8 (patch) | |
| tree | 3472d75c4c26977a28690f995e8796758d21a064 /zsh | |
| parent | 76b96b1dc88be642534baea32f9ba0f2603e9be3 (diff) | |
zsh/op-ssh-add: Use ‘command’ to avoid subshells
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/functions/op-ssh-add | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
