Fix gpg.zsh

This commit is contained in:
Sam A. 2023-03-30 23:45:57 +02:00
parent 78deede3be
commit ddb4be62f2
Signed by: samsapti
GPG Key ID: CBBBE7371E81C4EA
1 changed files with 9 additions and 7 deletions

View File

@ -1,8 +1,10 @@
if [[ -z $SSH_CONNECTION ]] && [[ $HOSTNAME != "toolbox" ]]; then if [[ $HOSTNAME != "toolbox" ]]; then
export GPG_TTY="$TTY" if [[ -z $SSH_CONNECTION ]]; then
gpgconf --launch gpg-agent export GPG_TTY="$TTY"
gpg-connect-agent updatestartuptty /bye &> /dev/null gpgconf --launch gpg-agent
else gpg-connect-agent updatestartuptty /bye &> /dev/null
gpgconf --kill all else
gpg-connect-agent reloadagent /bye &> /dev/null gpgconf --kill all
gpg-connect-agent reloadagent /bye &> /dev/null
fi
fi fi