Add coalesce function to git-info

that will be used by the minimal theme, and could be used for future
themes too. Prezto had this, but we diminished its necessity by
simplifying how git-info works.
This commit is contained in:
Eric Nielsen 2017-03-15 09:40:22 -05:00 committed by Matt Hamilton
parent a844454a65
commit d56bddf4b1
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# Prints the first non-empty string in the arguments array.
for arg in ${argv}; do
print -n ${arg}
return 0
done
return 1