zsh: optimize gpg-agent initialization
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
4e67805847
commit
5cfbe03d71
@ -6,12 +6,17 @@ z-gpg-agent() {
|
|||||||
|
|
||||||
(( ${+commands[gpg-agent]} )) || return 127
|
(( ${+commands[gpg-agent]} )) || return 127
|
||||||
|
|
||||||
local u
|
if (( ${+commands[systemctl]} )) ; then
|
||||||
|
local u s
|
||||||
for u in gpg-agent.{service,socket} ; do
|
for u in gpg-agent.{service,socket} ; do
|
||||||
z-systemctl-exists --user $u || continue
|
s=$(z-systemctl --user is-enabled $u)
|
||||||
|
case "$s" in
|
||||||
|
disabled ) ;;
|
||||||
|
* ) continue ;;
|
||||||
|
esac
|
||||||
z-systemctl --user --now enable $u
|
z-systemctl --user --now enable $u
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
(( ${+commands[gpgconf]} )) || return 127
|
(( ${+commands[gpgconf]} )) || return 127
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user