updates.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. diff --git b/plugins/gitfast/_git a/plugins/gitfast/_git
  2. index e2554130..a2e3bef5 100644
  3. --- b/plugins/gitfast/_git
  4. +++ a/plugins/gitfast/_git
  5. @@ -30,7 +30,7 @@ if [ -z "$script" ]; then
  6. local -a locations
  7. local e
  8. locations=(
  9. - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
  10. + "$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash"
  11. '/etc/bash_completion.d/git' # fedora, old debian
  12. '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
  13. '/usr/share/bash-completion/git' # gentoo
  14. @@ -214,8 +214,10 @@ _git ()
  15. if (( $+functions[__${service}_zsh_main] )); then
  16. __${service}_zsh_main
  17. - else
  18. + elif (( $+functions[__${service}_main] )); then
  19. emulate ksh -c __${service}_main
  20. + elif (( $+functions[_${service}] )); then
  21. + emulate ksh -c _${service}
  22. fi
  23. let _ret && _default && _ret=0
  24. diff --git b/plugins/gitfast/git-completion.bash a/plugins/gitfast/git-completion.bash
  25. index 9c8f7380..14012cab 100644
  26. --- b/plugins/gitfast/git-completion.bash
  27. +++ a/plugins/gitfast/git-completion.bash
  28. @@ -2915,6 +2915,6 @@ __git_complete gitk __gitk_main
  29. # when the user has tab-completed the executable name and consequently
  30. # included the '.exe' suffix.
  31. #
  32. -if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
  33. +if [[ "$OSTYPE" = cygwin* ]]; then
  34. __git_complete git.exe __git_main
  35. fi
  36. diff --git b/plugins/gitfast/git-prompt.sh a/plugins/gitfast/git-prompt.sh
  37. index 97eacd78..c1de34eb 100644
  38. --- b/plugins/gitfast/git-prompt.sh
  39. +++ a/plugins/gitfast/git-prompt.sh
  40. @@ -502,9 +502,11 @@ __git_ps1 ()
  41. local z="${GIT_PS1_STATESEPARATOR-" "}"
  42. - # NO color option unless in PROMPT_COMMAND mode
  43. - if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
  44. - __git_ps1_colorize_gitstring
  45. + # NO color option unless in PROMPT_COMMAND mode or it's Zsh
  46. + if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
  47. + if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then
  48. + __git_ps1_colorize_gitstring
  49. + fi
  50. fi
  51. b=${b##refs/heads/}