Advertisement
sidneystreith1985

zshrc

Mar 4th, 2025
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.50 KB | None | 0 0
  1. # Enable Git integration
  2. autoload -Uz vcs_info
  3.  
  4. # Set Git prompt style
  5. zstyle ':vcs_info:git:*' formats ' (%b)'
  6.  
  7. # Define the prompt
  8. autoload -U colors && colors
  9.  
  10. # Set up Git prompt
  11. precmd() {
  12.   vcs_info
  13. }
  14.  
  15. # Custom prompt configuration with Git
  16. 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 '
  17.  
  18. # Set prompt to automatically show the Git branch (if inside a Git repo)
  19. export PROMPT_DIRTRIM=3
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement