From 7e378f6ef99cdc4761179ee1df1a57cccd74a70f Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 5 May 2011 18:41:05 -0400 Subject: [PATCH 1/3] Added Compleat - Completion for Human Beings plugin. --- plugins/compleat/compleat.plugin.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 plugins/compleat/compleat.plugin.zsh diff --git a/plugins/compleat/compleat.plugin.zsh b/plugins/compleat/compleat.plugin.zsh new file mode 100644 index 0000000..8d16a56 --- /dev/null +++ b/plugins/compleat/compleat.plugin.zsh @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------ +# FILE: compleat.plugin.zsh +# DESCRIPTION: oh-my-zsh plugin file. +# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com) +# VERSION: 1.0.0 +# ------------------------------------------------------------------------------ + + +if (( ${+commands[compleat]} )); then + local prefix="${commands[compleat]:h:h}" + local setup="${prefix}/share/compleat-1.0/compleat_setup" + + if [[ -f "$setup" ]]; then + if ! bashcompinit >/dev/null 2>&1; then + autoload -U bashcompinit + bashcompinit -i + fi + + source "$setup" + fi +fi + From 9730de8e66c115b7964137778398e8dd7f15dcdf Mon Sep 17 00:00:00 2001 From: "Juan G. Hurtado" Date: Mon, 9 May 2011 13:32:42 +0200 Subject: [PATCH 2/3] Adds support for $(current_branch) on git_parse_ahead() Changes method git_parse_ahead() on git.zsh lib file. Before this change it checked directly against origin/master branch. Now it uses $(current_branch) to check for not pushed changes against the current remote branch. --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index e96f075..2ace3d0 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -15,7 +15,7 @@ parse_git_dirty() { # Checks if there are commits ahead from remote function git_prompt_ahead() { - if $(echo "$(git log origin/master..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then + if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then echo "$ZSH_THEME_GIT_PROMPT_AHEAD" fi } From 3d26995682a502150ab80f1fc5738802b1dc16aa Mon Sep 17 00:00:00 2001 From: Justin Riley Date: Mon, 9 May 2011 10:19:10 -0400 Subject: [PATCH 3/3] remove git status from prompt --- themes/jtriley.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/jtriley.zsh-theme b/themes/jtriley.zsh-theme index ec62a22..15d77ed 100644 --- a/themes/jtriley.zsh-theme +++ b/themes/jtriley.zsh-theme @@ -1,6 +1,6 @@ #PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d -%{$fg_bold[yellow]%}%% $(git_prompt_info)%{$reset_color%}" +%{$fg_bold[yellow]%}%% %{$reset_color%}" #ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" #ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"