From c3c80307860401dc0a8fbd9566e1d75a927dc3f6 Mon Sep 17 00:00:00 2001 From: Bram Crielaard Date: Thu, 7 Sep 2017 00:03:32 +0200 Subject: [PATCH] Add a dos inspired theme for oh-my-zsh - C prompt by default - F prompt if the previous command had an exit code other than 0 - G prompt when in a git repository, followed by the branch name (in yellow) and the status (dirty in red, clean in green) --- Extras/Chicago95.zsh-theme | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Extras/Chicago95.zsh-theme diff --git a/Extras/Chicago95.zsh-theme b/Extras/Chicago95.zsh-theme new file mode 100644 index 0000000..25f14e2 --- /dev/null +++ b/Extras/Chicago95.zsh-theme @@ -0,0 +1,12 @@ +local ret_status="%(?:C:F)" +function __msdos_pwd() { + local __path=$(pwd) + echo $__path | tr '/' '\\' +} +PROMPT='${ret_status}:$(git_prompt_info)$(__msdos_pwd)>' + +local ret_status_git="%(?:G:F)" +ZSH_THEME_GIT_PROMPT_PREFIX="\b\b${ret_status_git}:\\%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}\\%{$fg[red]%}dirty" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}\\%{$fg[green]%}clean"