From c7adfe9c31f6b7ad8b18a261aa8376686f62042a Mon Sep 17 00:00:00 2001 From: HaraldNordgren Date: Sun, 3 Apr 2016 03:52:37 +0200 Subject: [PATCH 1/3] Peepcode theme: Don't try to use RVM if not installed --- themes/peepcode.zsh-theme | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/themes/peepcode.zsh-theme b/themes/peepcode.zsh-theme index 96e4f1192..6a6067410 100644 --- a/themes/peepcode.zsh-theme +++ b/themes/peepcode.zsh-theme @@ -41,4 +41,10 @@ PROMPT=' %~ ${smiley} %{$reset_color%}' -RPROMPT='%{$fg[white]%} $(~/.rvm/bin/rvm-prompt)$(git_prompt)%{$reset_color%}' +if [[ -d ~/.rvm ]]; then + rvm_prompt='$(~/.rvm/bin/rvm-prompt)' +else + rvm_prompt='' +fi + +RPROMPT='%{$fg[white]%} $rvm_prompt$(git_prompt)%{$reset_color%}' From aafc5ac043455c67c8e8318ae5d3f50145ca368e Mon Sep 17 00:00:00 2001 From: HaraldNordgren Date: Sun, 3 Apr 2016 16:15:09 +0200 Subject: [PATCH 2/3] Modified Peepcode to make it cleaner --- themes/peepcode.zsh-theme | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/peepcode.zsh-theme b/themes/peepcode.zsh-theme index 6a6067410..1db6b8666 100644 --- a/themes/peepcode.zsh-theme +++ b/themes/peepcode.zsh-theme @@ -35,11 +35,13 @@ git_prompt() { fi } -local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" +local psign="%(?,%%,%{$fg[red]%}%%%{$reset_color%})" +local user="%{$bg[blue]%}%n%{$reset_color%}" +local host="%{$bg[blue]%}@%m%{$reset_color%}" PROMPT=' -%~ -${smiley} %{$reset_color%}' +${user}${host} %3~ + ${psign} ' if [[ -d ~/.rvm ]]; then rvm_prompt='$(~/.rvm/bin/rvm-prompt)' From d57b3ccaacb0ea685a63b08c197c9b0ed7d1ffe9 Mon Sep 17 00:00:00 2001 From: Harald Nordgren Date: Fri, 3 Jun 2016 15:00:30 +0200 Subject: [PATCH 3/3] Peepcode fix for OS X --- themes/peepcode.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/peepcode.zsh-theme b/themes/peepcode.zsh-theme index 1db6b8666..98e0c168f 100644 --- a/themes/peepcode.zsh-theme +++ b/themes/peepcode.zsh-theme @@ -23,7 +23,8 @@ git_mode() { git_dirty() { if [[ "$repo_path" != '.' && `git ls-files -m` != "" ]]; then - echo " %{$fg_bold[grey]%}✗%{$reset_color%}" + #echo " %{$fg_bold[grey]%}✗%{$reset_color%}" + echo " %{$fg_bold[grey]%}X%{$reset_color%}" fi }