小编yos*_*ach的帖子

向 oh-my-zsh robbyrussell 主题添加时间戳

我想在 oh-my-zsh 中向我的命令提示符添加时间戳。这是当前的主题提示 ( robbyrussell ):

local ret_status="%(?:%{$fg_bold[green]%}? :%{$fg_bold[red]%}? %s)"
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'

ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
Run Code Online (Sandbox Code Playgroud)

知道如何添加时间戳吗?

zsh themes

41
推荐指数
4
解决办法
4万
查看次数

标签 统计

themes ×1

zsh ×1