Add on/off option to gpg_ssh
This commit is contained in:
parent
ac2287dbfc
commit
3b25addae0
|
@ -28,7 +28,13 @@ get_ip() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gpg_ssh() {
|
gpg_ssh() {
|
||||||
|
if [[ $1 == "on" ]]; then
|
||||||
|
export SSH_AUTH_SOCK_OLD="$SSH_AUTH_SOCK"
|
||||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
elif [[ $1 == "off" ]]; then
|
||||||
|
[[ -n $SSH_AUTH_SOCK_OLD ]] && export SSH_AUTH_SOCK="$SSH_AUTH_SOCK_OLD"
|
||||||
|
unset SSH_AUTH_SOCK_OLD
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
http() {
|
http() {
|
||||||
|
|
Loading…
Reference in a new issue