From a170d5b2b2160d4222aa61598812a28b89469535 Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sat, 26 Jan 2019 11:11:31 +0800 Subject: [PATCH] gpg module: grep conditon fix --- 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 1e245898..3bac09b1 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 -- "^[0-9]* gpg-agent$"; then + if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "^ *[0-9]* gpg-agent$"; then eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")" fi fi