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' diff --git a/themes/two-lines.zsh-theme b/themes/two-lines.zsh-theme new file mode 100644 index 000000000..a45220766 --- /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