From 1556ee03943286208a2f992cc55eb2a5e447b52a Mon Sep 17 00:00:00 2001 From: eKa Date: Thu, 17 Oct 2019 03:40:31 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9A=D1=80=D0=BE=D1=88=D0=B5=D1=87=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=82=D0=B5=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/themes/eof-tiny.zsh-theme | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 zsh/themes/eof-tiny.zsh-theme diff --git a/zsh/themes/eof-tiny.zsh-theme b/zsh/themes/eof-tiny.zsh-theme new file mode 100644 index 0000000..a50228a --- /dev/null +++ b/zsh/themes/eof-tiny.zsh-theme @@ -0,0 +1,23 @@ +# Depends on the git plugin for work_in_progress() + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +#Customized git status, oh-my-zsh currently does not allow render dirty status before branch +git_custom_status() { + local cb=$(git_current_branch) + if [ -n "$cb" ]; then + echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + fi +} + +# RVM component of prompt +ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}[" +ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}" + +# Combine it all into a final right-side prompt +RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1' + +PROMPT='%{$fg[green]%}[%{$fg[cyan]%}%~% %{$fg[green]%}]%(?.%{$fg[green]%}.%{$fg[red]%})%B%#%b ' \ No newline at end of file