diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2019-06-07 10:57:47 -0500 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-06-07 17:57:46 +0200 |
commit | eb3d46308157e10eb11ec96bcf14b319279d09d3 (patch) | |
tree | bcf6b19a02325cba7c60e06c9c516b1473774fd9 /plugins/gitfast/git-prompt.sh | |
parent | 52fdae4b3d17f7ab602124ec8792865b5fc03236 (diff) | |
download | zsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.tar.gz zsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.tar.bz2 zsh-eb3d46308157e10eb11ec96bcf14b319279d09d3.zip |
gitfast: update to upstream v2.21 (#7914)
* gitfast: use $OSTYPE again
In the last update to upstream this was reverted:
a56eac7a (Use OSTYPE instead of uname whenever possible for better speed. (#5496))
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: simplify plugin
No need to set and unset a variable we use once.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: add script to update from upstream
This would make easier the process of updating, and also not miss our
patches.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: update to upstream v2.21
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'plugins/gitfast/git-prompt.sh')
-rw-r--r-- | plugins/gitfast/git-prompt.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index cd905759e..fd2b049db 100644 --- a/plugins/gitfast/git-prompt.sh +++ b/plugins/gitfast/git-prompt.sh @@ -278,11 +278,12 @@ __git_ps1_colorize_gitstring () r="$c_clear$r" } +# Helper function to read the first line of a file into a variable. +# __git_eread requires 2 arguments, the file path and the name of the +# variable, in that order. __git_eread () { - local f="$1" - shift - test -r "$f" && read "$@" <"$f" + test -r "$1" && IFS=$'\r\n' read "$2" <"$1" } # __git_ps1 accepts 0 or 1 arguments (i.e., format string) |