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)