From 4305f85fded2b2569d7fd96fafcb2ce19f0eabdc Mon Sep 17 00:00:00 2001 From: Alexander Madyankin Date: Wed, 4 Jan 2012 19:53:16 +0600 Subject: [PATCH 1/3] The two-lines theme has been added --- themes/two-lines.zsh-theme | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 themes/two-lines.zsh-theme diff --git a/themes/two-lines.zsh-theme b/themes/two-lines.zsh-theme new file mode 100644 index 000000000..7adda2c0e --- /dev/null +++ b/themes/two-lines.zsh-theme @@ -0,0 +1,28 @@ +local magenta=$fg[magenta] +local blue=$fg[blue] +local red=$fg[red] +local green=$fg[green] + +# Show a unicode character representing your current ruby VM. +function _show_rvm_prompt() { + local rvm_char + if [ -x "${HOME}/.rvm/bin/rvm-prompt" ]; then + rvm_char=`${HOME}/.rvm/bin/rvm-prompt u 2>/dev/null` + [ -n "${rvm_char}" ] && echo "${rvm_char} " + fi +} + +local return_code="%(?..%{$red%}%? ↵%{$reset_color%})" + +PROMPT=' +%{$magenta%}%n@%m%{$reset_color%}: %{$blue%}%~ $(git_prompt_info)%{$reset_color%} +$(_show_rvm_prompt)> ' + +RPS1="${return_code}" + + +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$blue%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$red%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$green%}?" +ZSH_THEME_GIT_PROMPT_CLEAN="" \ No newline at end of file From 4647dd4332d95a4822ceba7ca310bc9fd4e0bda1 Mon Sep 17 00:00:00 2001 From: Alexander Madyankin Date: Wed, 4 Jan 2012 20:08:13 +0600 Subject: [PATCH 2/3] grm alias has been added --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index c1b382b2c..e9cf92123 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -36,6 +36,8 @@ alias ga='git add' compdef _git ga=git-add alias gm='git merge' compdef _git gm=git-merge +alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm" +compdef _git grm=git-rm # Git and svn mix alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' From 15629055ca51f27e17c2af40efb67870d9999f3b Mon Sep 17 00:00:00 2001 From: Alexander Madyankin Date: Thu, 5 Jan 2012 00:20:39 +0600 Subject: [PATCH 3/3] two-line theme fix --- themes/two-lines.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/two-lines.zsh-theme b/themes/two-lines.zsh-theme index 7adda2c0e..a45220766 100644 --- a/themes/two-lines.zsh-theme +++ b/themes/two-lines.zsh-theme @@ -14,8 +14,8 @@ function _show_rvm_prompt() { local return_code="%(?..%{$red%}%? ↵%{$reset_color%})" -PROMPT=' -%{$magenta%}%n@%m%{$reset_color%}: %{$blue%}%~ $(git_prompt_info)%{$reset_color%} + +PROMPT='%{$magenta%}%n@%m%{$reset_color%}: %{$blue%}%~ $(git_prompt_info)%{$reset_color%} $(_show_rvm_prompt)> ' RPS1="${return_code}"