mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge d6b6f7a7f6 into 291e96dcd0
This commit is contained in:
commit
52d7954dbe
1 changed files with 15 additions and 0 deletions
15
themes/hanwentao.zsh-theme
Normal file
15
themes/hanwentao.zsh-theme
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
function ssh_username_hostname() {
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
echo "%{$fg_bold[green]%}%n@%m "
|
||||
fi
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}git:(%{$fg_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}X%{$fg_bold[cyan]%})"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})"
|
||||
|
||||
local current_dir="%{$fg_bold[blue]%}%~ "
|
||||
local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%}%? )%# "
|
||||
|
||||
PROMPT='%s$(ssh_username_hostname)${current_dir}$(git_prompt_info)${ret_status}%{$reset_color%}'
|
||||
Loading…
Add table
Add a link
Reference in a new issue