From 07f5f9f4e924aba895ff852d55d9ad4e6aca3f3f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 19 Nov 2024 09:22:24 +0100 Subject: [PATCH] gak,gau --- sh/alias/gpg.sh | 14 ++++++++++++++ sh/gpg.sh | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 sh/alias/gpg.sh diff --git a/sh/alias/gpg.sh b/sh/alias/gpg.sh new file mode 100644 index 0000000..30ece71 --- /dev/null +++ b/sh/alias/gpg.sh @@ -0,0 +1,14 @@ +# turn gpg agent off +gak() { sa__gpg_agent_kill "${@}"; } +sa__gpg_agent_kill() { + gpgconf \ + --kill "gpg-agent" +} + +# bind gpg agent to current tty +gau() { sa__gpg_agent_update "${@}"; } +sa__gpg_agent_update() { + gpg-connect-agent \ + updatestartuptty \ + /bye +} diff --git a/sh/gpg.sh b/sh/gpg.sh index ffa4f63..5990fd0 100644 --- a/sh/gpg.sh +++ b/sh/gpg.sh @@ -1,18 +1,3 @@ -# turn gpg agent off -gak() { gpg_agent_kill "${@}"; } -sh_gpg_agent_kill() { - gpgconf \ - --kill "gpg-agent" -} - -# bind gpg agent to current tty -gau() { gpg_agent_update "${@}"; } -sh_gpg_agent_update() { - gpg-connect-agent \ - updatestartuptty \ - /bye -} - sh_gpg_ssh() { local user_id user_id=$(id --user)