Created
June 22, 2023 14:50
-
-
Save terrisgit/95c179678ba3e73801f4b95ce28c0763 to your computer and use it in GitHub Desktop.
Git Branch in Prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prompt example: ~/dir [repo-name] main () % | |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:git*' formats "[%r] %b (%a) %m%u%c " | |
| precmd() { vcs_info } | |
| setopt prompt_subst | |
| PROMPT='${PWD/#$HOME/~} ${vcs_info_msg_0_}%# ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment