BUG: git prompt breaks with zsh < 5.0.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A change to git-prompt.sh in v2.38 to show presence of unresolved conflicts contains syntax which is not valid under zsh < 5.0.6. This version of zsh is old, but is still the default on RedHat 7 machines, for example.

The offending block is:

       local conflict="" # state indicator for unresolved conflicts
       if [[ "${GIT_PS1_SHOWCONFLICTSTATE}" == "yes" ]] &&
          [[ $(git ls-files --unmerged 2>/dev/null) ]]; then
               conflict="|CONFLICT"
       fi

[[ $(command) ]] syntax doesn't work in older version of zsh and should use [[ -n "$(command)" ]] instead.

Thanks,
Vitaly





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux