Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Enable Git integration
- autoload -Uz vcs_info
- # Set Git prompt style
- zstyle ':vcs_info:git:*' formats ' (%b)'
- # Define the prompt
- autoload -U colors && colors
- # Set up Git prompt
- precmd() {
- vcs_info
- }
- # Custom prompt configuration with Git
- PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$fg[cyan]%}${vcs_info_msg_0_}%{$reset_color%}$%b '
- # Set prompt to automatically show the Git branch (if inside a Git repo)
- export PROMPT_DIRTRIM=3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement