diff --git a/bash/alias/gpg.sh b/bash/alias/gpg.sh new file mode 100644 index 0000000..80705c5 --- /dev/null +++ b/bash/alias/gpg.sh @@ -0,0 +1,12 @@ +# turn gpg agent off +alias gpgoff="\ +gpgconf \ +--kill \"gpg-agent\" \ +" + +# bind gpg agent to current tty +alias gpgtty="\ +gpg-connect-agent \ +updatestartuptty \ +/bye \ +" diff --git a/bash/gnupg.sh b/bash/gnupg.sh deleted file mode 100644 index ab29be1..0000000 --- a/bash/gnupg.sh +++ /dev/null @@ -1,8 +0,0 @@ -if [ ${EUID} -ne 0 ] ; then - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - gpg-connect-agent updatestartuptty /bye > /dev/null -fi - -alias gpgoff='gpgconf --kill gpg-agent' - -alias gpgtty='gpg-connect-agent updatestartuptty /bye' diff --git a/bash/gpg.sh b/bash/gpg.sh new file mode 100644 index 0000000..8025b64 --- /dev/null +++ b/bash/gpg.sh @@ -0,0 +1,4 @@ +if [ ${EUID} -ne 0 ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + gpg-connect-agent updatestartuptty /bye > '/dev/null' +fi