From da9a3fc6b076a9508edd7765c1c9d26f0b39438b Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 16 Feb 2024 10:41:14 +0100 Subject: [PATCH] gnupg: Don't call tty(1), use the $TTY variable This fixes setting GPG_TTY when stdin is not a real terminal, for example when using Powerlevel10k "instant prompt". See . --- plugins/gnupg/gnupg.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gnupg/gnupg.zshrc b/plugins/gnupg/gnupg.zshrc index 17d6dc5..2b95624 100644 --- a/plugins/gnupg/gnupg.zshrc +++ b/plugins/gnupg/gnupg.zshrc @@ -14,7 +14,7 @@ else (( $+commands[gpg] )) || return 1 fi -export GPG_TTY=$(tty) +export GPG_TTY=$TTY if (( $+commands[gpg-connect-agent] )); then # Try to start/connect the agent ... -- 2.39.2