From 4c7ac6ff2ebdfa0afa5fbcb2f57889786f610f90 Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sun, 28 Jun 2020 15:29:50 +0800 Subject: [PATCH] gpg module: the original grep expression cannot work on macos, make it simple for checking --- modules/gpg/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpg/init.zsh b/modules/gpg/init.zsh index d547d401..565f21d5 100644 --- a/modules/gpg/init.zsh +++ b/modules/gpg/init.zsh @@ -22,7 +22,7 @@ source "$_gpg_agent_env" 2> /dev/null # Start gpg-agent if not started. if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then # Start gpg-agent if not started. - if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then + if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q "gpg-agent"; then mkdir -p "$_gpg_agent_env:h" eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")" fi