From a5786d56313ce443f541045d4b1400c64844f620 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Mon, 11 Jul 2011 16:06:38 +0200 Subject: [PATCH 1/7] Added ebouchut theme --- themes/ebouchut.zsh-theme | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 themes/ebouchut.zsh-theme diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme new file mode 100644 index 000000000..604cce12c --- /dev/null +++ b/themes/ebouchut.zsh-theme @@ -0,0 +1,42 @@ +# ebouchut ZSH Theme +# +# author: Eric Bouchut +# +# Left Prompt: +# username@hostname:current_directory% +# +# Right prompt when in a Git repository: +# ±‹branch_name clean_or_dirty ahead [short_sha] status› +# + +ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" + +# clean_or_dirty +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" + +# status +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}✚" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[magenta]%}✹" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}✖" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[blue]%➜" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[cyan]%}═" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭" + +# when ahead +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}!" + +# short_sha +ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}[" +ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]" + +local username="%{$fg_bold[green]%}%n%{$reset_color%}" +local hostname="%{$fg_bold[magenta]%}%m%{$reset_color%}" +local current_dir="$fg_bold[blue]%}%~%{$reset_color%}" + +# Left prompt: username@hostname:current_directory% +PROMPT='$username@$hostname:$current_dir%# ' + +# Right Prompt: ±‹branch_name clean_or_dirty ahead [short_sha]status› +RPROMPT='$(git_prompt_info)$(git_prompt_ahead) $(git_prompt_short_sha)%{$reset_color%} $(git_prompt_status)%{$reset_color%}›' From 5a0f8a148329666c79317ef633586d2619341c0d Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Fri, 15 Jul 2011 12:40:18 +0200 Subject: [PATCH 2/7] Updated prompt Moved status before ahead Fixed angle bracket position, now after clean_or_dirty --- themes/ebouchut.zsh-theme | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 604cce12c..2bb7b3066 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -6,11 +6,11 @@ # username@hostname:current_directory% # # Right prompt when in a Git repository: -# ±‹branch_name clean_or_dirty ahead [short_sha] status› +# ±‹branch_name clean_or_dirty› status(ahead) [short_sha ] # ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}›" # clean_or_dirty ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" @@ -25,7 +25,7 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[cyan]%}═" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭" # when ahead -ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}!" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}(!)" # short_sha ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}[" @@ -38,5 +38,5 @@ local current_dir="$fg_bold[blue]%}%~%{$reset_color%}" # Left prompt: username@hostname:current_directory% PROMPT='$username@$hostname:$current_dir%# ' -# Right Prompt: ±‹branch_name clean_or_dirty ahead [short_sha]status› -RPROMPT='$(git_prompt_info)$(git_prompt_ahead) $(git_prompt_short_sha)%{$reset_color%} $(git_prompt_status)%{$reset_color%}›' +# Right prompt when in a git repo: ±‹branch_name clean_or_dirty› status(ahead) [short_sha] +RPROMPT='$(git_prompt_info) $(git_prompt_status)$(git_prompt_ahead) $(git_prompt_short_sha)' From 5b8303ece79e87c9e67555b7ade3ad444bd28736 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Fri, 15 Jul 2011 15:14:27 +0200 Subject: [PATCH 3/7] Added snapshot URL Fixed reset_color --- themes/ebouchut.zsh-theme | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 2bb7b3066..8cfec7b71 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -1,13 +1,13 @@ # ebouchut ZSH Theme -# -# author: Eric Bouchut +# http://img638.imageshack.us/img638/5069/b2f.png # # Left Prompt: # username@hostname:current_directory% # # Right prompt when in a Git repository: -# ±‹branch_name clean_or_dirty› status(ahead) [short_sha ] +# ±‹branch_name clean_or_dirty› status(ahead) [short_sha] # +# author: Eric Bouchut ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}›" @@ -17,15 +17,15 @@ ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" # status -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}✚" -ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[magenta]%}✹" -ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}✖" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[blue]%➜" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[cyan]%}═" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭" +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}✚%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[magenta]%}✹%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}✖%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[blue]%➜%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[cyan]%}═%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭%{$reset_color%}" # when ahead -ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}(!)" +ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}(!)%{$reset_color%}" # short_sha ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}[" From 2044a50523b02ac4d2fd666b5c41d730048e8768 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Tue, 9 Aug 2011 15:45:43 +0200 Subject: [PATCH 4/7] Fixed bug: The prompt was too large --- themes/ebouchut.zsh-theme | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 8cfec7b71..9058e07b6 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -10,7 +10,7 @@ # author: Eric Bouchut ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}›" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}› " # clean_or_dirty ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" @@ -28,15 +28,15 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭%{$reset_color%}" ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}(!)%{$reset_color%}" # short_sha -ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}[" +ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$reset_color%}[" ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]" local username="%{$fg_bold[green]%}%n%{$reset_color%}" local hostname="%{$fg_bold[magenta]%}%m%{$reset_color%}" -local current_dir="$fg_bold[blue]%}%~%{$reset_color%}" +local current_dir="%{$fg_bold[blue]%}%~%{$reset_color%}" # Left prompt: username@hostname:current_directory% PROMPT='$username@$hostname:$current_dir%# ' # Right prompt when in a git repo: ±‹branch_name clean_or_dirty› status(ahead) [short_sha] -RPROMPT='$(git_prompt_info) $(git_prompt_status)$(git_prompt_ahead) $(git_prompt_short_sha)' +RPROMPT='$(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)' From 51c9f43c941872d3e5620525b310b80247fda12c Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Thu, 10 Nov 2011 10:54:10 +0100 Subject: [PATCH 5/7] Fixed bug in ZSH_THEME_GIT_PROMPT_RENAMED --- themes/ebouchut.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 9058e07b6..5e9410032 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -20,7 +20,7 @@ ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}✚%{$reset_color%}" ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[magenta]%}✹%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}✖%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[blue]%➜%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[blue]%}➜%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[cyan]%}═%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[green]%}✭%{$reset_color%}" From 97c5191192714c9b2b71b07c5565b506b4dc6ce4 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Fri, 20 Jan 2012 14:24:37 +0100 Subject: [PATCH 6/7] Added last command status and RVM config --- themes/ebouchut.zsh-theme | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 5e9410032..70cd856ae 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -6,7 +6,7 @@ # # Right prompt when in a Git repository: # ±‹branch_name clean_or_dirty› status(ahead) [short_sha] -# +# # author: Eric Bouchut ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}" @@ -34,9 +34,14 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]" local username="%{$fg_bold[green]%}%n%{$reset_color%}" local hostname="%{$fg_bold[magenta]%}%m%{$reset_color%}" local current_dir="%{$fg_bold[blue]%}%~%{$reset_color%}" +local cmd_status="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" +local rvm_config=$(~/.rvm/bin/rvm-prompt) -# Left prompt: username@hostname:current_directory% -PROMPT='$username@$hostname:$current_dir%# ' +# Left prompt: username@hostname:current_directory +PROMPT=' +$username@$hostname:$current_dir +${cmd_status} ' -# Right prompt when in a git repo: ±‹branch_name clean_or_dirty› status(ahead) [short_sha] -RPROMPT='$(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)' + +# Right prompt when in a git repo: rvm_config ±‹branch_name clean_or_dirty› status(ahead) [short_sha] +RPROMPT='${rvm_config} $(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)' From d1ccc6375e626e43c320e7dc7c2a0c1f0bb53dd6 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Tue, 24 Jan 2012 14:20:47 +0100 Subject: [PATCH 7/7] Fixed RPROMPT: RVM version is not updated --- themes/ebouchut.zsh-theme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/ebouchut.zsh-theme b/themes/ebouchut.zsh-theme index 70cd856ae..1fde4a32d 100644 --- a/themes/ebouchut.zsh-theme +++ b/themes/ebouchut.zsh-theme @@ -34,8 +34,8 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]" local username="%{$fg_bold[green]%}%n%{$reset_color%}" local hostname="%{$fg_bold[magenta]%}%m%{$reset_color%}" local current_dir="%{$fg_bold[blue]%}%~%{$reset_color%}" -local cmd_status="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" -local rvm_config=$(~/.rvm/bin/rvm-prompt) +local cmd_status="%(?,%{$fg_bold[green]%}☺%{$reset_color%},%{$fg_bold[red]%}☹%{$reset_color%})" + # Left prompt: username@hostname:current_directory PROMPT=' @@ -44,4 +44,4 @@ ${cmd_status} ' # Right prompt when in a git repo: rvm_config ±‹branch_name clean_or_dirty› status(ahead) [short_sha] -RPROMPT='${rvm_config} $(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)' +RPROMPT='$(~/.rvm/bin/rvm-prompt) $(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)'