summaryrefslogtreecommitdiffstatshomepage
path: root/gnupg/.config
diff options
context:
space:
mode:
Diffstat (limited to 'gnupg/.config')
-rw-r--r--gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh b/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh
index 532697e..0b3c422 100644
--- a/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh
+++ b/gnupg/.config/zsh/.zshrc.d/20-gnupg.zsh
@@ -1,9 +1,9 @@
#!/bin/zsh
# vim:ft=sh
-GPG_TTY=$(tty)
-export GPG_TTY
+if [ -t 0 ] && [ -z "$SSH_TTY" ]; then
+ export GPG_TTY="$(tty)"
+ export PINENTRY_USER_DATA=USE_TTY=1
+fi
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
-
-alias unlock='echo "" | gpg --clearsign 1>/dev/null && ssh localhost -- : 1>/dev/null'