diff options
author | awy <awy@awy.one> | 2024-10-29 21:59:47 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2024-10-29 21:59:47 +0300 |
commit | ac96c924ae68840a38139c14d68de6775144cde4 (patch) | |
tree | da5fcb57b3a6ed4da09b77ad9ceffe1f26db9d26 /.config/zsh/.zshrc | |
parent | 27a6997cf03e29c89fd607355435ece656849f72 (diff) |
zsh git integration
Diffstat (limited to '.config/zsh/.zshrc')
-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 |