From f7b981402d7e3fd04ab44fafe052f258cec8b950 Mon Sep 17 00:00:00 2001 From: Greg Sieranski Date: Sat, 3 Dec 2016 14:46:10 -0600 Subject: [PATCH] resolve race condition between git completion and coalesce function --- modules/helper/init.zsh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/helper/init.zsh b/modules/helper/init.zsh index 9d792186..3883f7d7 100644 --- a/modules/helper/init.zsh +++ b/modules/helper/init.zsh @@ -23,9 +23,7 @@ function is-true { # Prints the first non-empty string in the arguments array. function coalesce { - for arg in $argv; do - print "$arg" - return 0 - done - return 1 + print "${${(s: :)@}[1]}" } + +