1
0
Fork 0
mirror of synced 2024-11-16 13:05:35 -05:00
zimfw/modules/git-info/functions/coalesce
Eric Nielsen 270b5d0390 [git-info] Simplify functions
Add missing local variable set.
Replace `>/dev/null 2>&1` by `&>/dev/null`.
Check return value of zstyle (if zero), instead of resulting string
value (if non-empty).
2018-10-02 20:02:06 -05:00

8 lines
163 B
Bash

# vim:et sts=2 sw=2 ft=zsh
# Prints the first non-empty string in the arguments array.
local arg
for arg in ${argv}; do
print -n ${arg}
return 0
done
return 1