To get a prompt which indicates Git-branch in Zsh

前端 未结 9 1891
滥情空心
滥情空心 2020-12-04 09:12

I run the following codes separately as my prompt unsuccessfully in .zshrc. This suggests me that apparently I do not have a program called __git_ps1. It is not in MacPorts.

9条回答
  •  感情败类
    2020-12-04 09:42

    For anyone interested in a maintained ready-made solution, install https://github.com/ohmyzsh/ohmyzsh - it has a git plugin turned on by default. I was looking for sth like this - no-brainer pre-created configuration, works nice.

提交回复
热议问题