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:
parent
96d6b66de1
commit
d440135f52
1 changed files with 6 additions and 0 deletions
6
modules/git-info/functions/coalesce
Normal file
6
modules/git-info/functions/coalesce
Normal 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
|
Loading…
Reference in a new issue