resolve race condition between git completion and coalesce function

This commit is contained in:
Greg Sieranski 2016-12-03 14:46:10 -06:00
parent 4f19700919
commit f7b981402d

View file

@ -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]}"
}