zsh:config(ubuntu22.04.2)
1. zsh : PS1
1 [wit@on ~]$ cat ~/.oh-my-zsh/themes/david.zsh-theme
2 PROMPT="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})[%{$fg_bold[red]%}%n@%{$fg_bold[red]%}%m %{$fg_bold[cyan]%}%c]$%{$reset_color%} "
3 PROMPT+=' $(git_prompt_info)'
4
5 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
6 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
7 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
8 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
9 [wit@on ~]$
2. reference
2.1 https://www.cnblogs.com/sidianok/p/17400527.html
本文由 lnlidawei 原创、整理、转载,本文来自于【博客园】; 整理和转载的文章的版权归属于【原创作者】; 转载或引用时请【保留文章的来源信息】:https://www.cnblogs.com/lnlidawei/p/17690672.html