From 1ab9dc6ca77f5c78fad4c3a8aeb3bd6f0e00b61c Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 18 Dec 2015 10:51:20 +0100 Subject: [PATCH] Add a gpg alias to load keychain --- zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index f8a9dcc..7ca8fa3 100644 --- a/zshrc +++ b/zshrc @@ -252,9 +252,11 @@ alias ping6="ping6 -c 3" ## JOSM alias josm="java -jar -Xmx2048M /opt/josm-tested.jar" -## SSH -# If keychain doesn't exist, load it then source the file-sh +## Keychain +# For SSH: If keychain doesn't exist, load it then source the file-sh alias ssh="[[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_rsa; source ~/.keychain/$HOST-sh; ssh " +# For GPG: If keychain doesn't exist, load it then source the file-sh-gpg +alias gpg="[[ ! -f ~/.keychain/$HOST-sh-gpg ]] && keychain --noask --systemd --agents gpg; source ~/.keychain/$HOST-sh-gpg; gpg " ####################################### #Ouverture d'un programme en fonction