diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/zsh/.zshrc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index a2c2dfe..cbe7383 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,7 +1,14 @@ # Enable colors and change prompt: autoload -U colors && colors # Load colors -PS1="%{$fg[green]%}%n%{$reset_color%}@%M %{$fg[green]%}%~%{$reset_color%}> " +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +zstyle ':vcs_info:git:*' formats "[%b]%{$fg[yellow]%}%u" +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' unstagedstr '*' +setopt PROMPT_SUBST +PROMPT='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$fg[red]%}${vcs_info_msg_0_}%{$reset_color%}$%b ' setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. setopt interactive_comments |