From 354ab87c85fb117d62cd314e957cd8708c3b7fe4 Mon Sep 17 00:00:00 2001 From: Nikita Vasilyev Date: Sun, 14 Mar 2010 23:08:27 +0300 Subject: [PATCH 001/108] Arrow theme: http://elv1s.ru/i/zsh-arrow-theme.png --- themes/arrow.zsh-theme | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 themes/arrow.zsh-theme diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme new file mode 100644 index 000000000..cfe558c0e --- /dev/null +++ b/themes/arrow.zsh-theme @@ -0,0 +1,9 @@ +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="yellow"; fi + +PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' +RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' + +# See http://geoff.greer.fm/lscolors/ +export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx" +export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:" + From 477835250273ce3f963e03ad4a75ca010f4d9972 Mon Sep 17 00:00:00 2001 From: Nikita Vasilyev Date: Tue, 16 Mar 2010 23:44:01 +0300 Subject: [PATCH 002/108] git:(master) --> git:master Parenthesis removed --- themes/arrow.zsh-theme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index cfe558c0e..a23efd1d7 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -3,6 +3,11 @@ if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="yellow"; fi PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' +ZSH_THEME_GIT_PROMPT_PREFIX="git:" +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_DIRTY="*" +ZSH_THEME_GIT_PROMPT_CLEAN="" + # See http://geoff.greer.fm/lscolors/ export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx" export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:" From f9abe041e2b70217b0d2f5519a51a57854b49857 Mon Sep 17 00:00:00 2001 From: Dallas Reedy Date: Wed, 17 Mar 2010 11:25:17 -0700 Subject: [PATCH 003/108] added my personal theme: the dallas them --- themes/dallas.zsh-theme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/dallas.zsh-theme diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme new file mode 100644 index 000000000..10e019be0 --- /dev/null +++ b/themes/dallas.zsh-theme @@ -0,0 +1,14 @@ +# Personalized! +# [red][normal][purple][yellow][normal] +# dallas@lappy ~/Sites % +# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " +# PROMPT="{white}\{{yellow}{time}{white}\}{green}{host}{white}:{cyan}{pwd} {red,bold}{user}{white}%{normal} " + +DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%T%{$fg[white]%}}%{$reset_color%}" +DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}" +DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}" +DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~%{$reset_color%}" +DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}" +DALLAS_PROMPT_CHAR_="%{$fg[white]%}%%%{$reset_color%}" + +PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ " From 3e1d5fa3164db236653756bde816c94af7d23b01 Mon Sep 17 00:00:00 2001 From: Tomas Kramar Date: Mon, 22 Mar 2010 21:44:15 +0100 Subject: [PATCH 004/108] Make Shift+Tab move backwards in the menu --- lib/key-bindings.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 87e47bab6..8d22eb2b3 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -20,6 +20,7 @@ bindkey "^[[F" end-of-line bindkey "^[[4~" end-of-line bindkey ' ' magic-space # also do history expansion on space +bindkey '^[[Z' reverse-menu-complete # consider emacs keybindings: @@ -38,4 +39,4 @@ bindkey ' ' magic-space # also do history expansion on space #bindkey '^I' complete-word ## Fix weird sequence that rxvt produces #bindkey -s '^[[Z' '\t' -# \ No newline at end of file +# From 6356d70710876edfe335022bdef79595c2e65d62 Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 8 Apr 2010 14:11:42 -0400 Subject: [PATCH 005/108] Added theme "jreese" to oh-my-zsh --- themes/jreese.zsh-theme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/jreese.zsh-theme diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme new file mode 100644 index 000000000..0f91776c6 --- /dev/null +++ b/themes/jreese.zsh-theme @@ -0,0 +1,14 @@ +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %2~ \ +$(git_prompt_info)\ +%{$fg[red]%}%(!.#.»)%{$reset_color%} ' +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' +RPS1='${return_code}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="⚡" + From 51935f768d69470d92d2f00f14c98a0380605075 Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 8 Apr 2010 15:02:56 -0400 Subject: [PATCH 006/108] Added screenshot link for jreese theme --- themes/jreese.zsh-theme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 0f91776c6..111dc0dee 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -1,3 +1,5 @@ +# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png + if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" From a4dd691af5cdb3ce818fa14d32d58cbcecf45b4d Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 8 Apr 2010 15:07:43 -0400 Subject: [PATCH 007/108] Remove limit of two segments to PWD --- themes/jreese.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 111dc0dee..534664f11 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -3,7 +3,7 @@ if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %2~ \ +PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ $(git_prompt_info)\ %{$fg[red]%}%(!.#.»)%{$reset_color%} ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' From 99d72cad5573f7481c28a75228b940f2212c9e1b Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 8 Apr 2010 22:35:35 -0400 Subject: [PATCH 008/108] Ignore errors from compaudit when using `sudo -s` --- lib/completion.zsh | 2 +- lib/key-bindings.zsh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 46b6d8f65..b58612dbf 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -9,7 +9,7 @@ unsetopt flowcontrol WORDCHARS='' autoload -U compinit -compinit +compinit -i zmodload -i zsh/complist diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 87e47bab6..2e282d66a 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -1,6 +1,6 @@ # TODO: Explain what some of this does.. autoload -U compinit -compinit +compinit -i bindkey -e bindkey '\ew' kill-region @@ -38,4 +38,4 @@ bindkey ' ' magic-space # also do history expansion on space #bindkey '^I' complete-word ## Fix weird sequence that rxvt produces #bindkey -s '^[[Z' '\t' -# \ No newline at end of file +# From 3c87d483628267e48fc0f462f46488dcd4f87810 Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Tue, 4 May 2010 16:18:57 -0400 Subject: [PATCH 009/108] makes git status prompt 4x faster (via git status -s, benchmarked) --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 629a08b0e..1d1d24deb 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -5,7 +5,7 @@ function git_prompt_info() { } parse_git_dirty () { - if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then + if [[ -n $(git status -s 2> /dev/null) ]]; then echo "$ZSH_THEME_GIT_PROMPT_DIRTY" else echo "$ZSH_THEME_GIT_PROMPT_CLEAN" From 02bd8ab53e82c1b9be5f13e72e087b7a5d95373c Mon Sep 17 00:00:00 2001 From: canthiswait Date: Mon, 26 Apr 2010 16:02:19 -0700 Subject: [PATCH 010/108] Added scpectrum script for easy 256 color theaming --- lib/spectrum.zsh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/spectrum.zsh diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh new file mode 100644 index 000000000..4864654cb --- /dev/null +++ b/lib/spectrum.zsh @@ -0,0 +1,20 @@ +#! /bin/zsh +# A script to make using 256 colors in zsh less painful. +# P.C. Shyamshankar +# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ + +typeset -Ag FX FG BG + +FX=( + reset "" + bold "" no-bold "" + italic "" no-italic "" + underline "" no-underline "" + blink "" no-blink "" + reverse "" no-reverse "" +) + +for color in {000..255}; do + FG[$color]="[38;5;${color}m" + BG[$color]="[48;5;${color}m" +done From e8ef16570f9828553f9b0e926563a1496bf3740c Mon Sep 17 00:00:00 2001 From: canthiswait Date: Mon, 26 Apr 2010 22:01:41 -0700 Subject: [PATCH 011/108] escape sequences so rprompt doesn't mess up --- lib/spectrum.zsh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index 4864654cb..4006a7fe1 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -6,15 +6,15 @@ typeset -Ag FX FG BG FX=( - reset "" - bold "" no-bold "" - italic "" no-italic "" - underline "" no-underline "" - blink "" no-blink "" - reverse "" no-reverse "" + reset "%{%}" + bold "%{%}" no-bold "%{%}" + italic "%{%}" no-italic "%{%}" + underline "%{%}" no-underline "%{%}" + blink "%{%}" no-blink "%{%}" + reverse "%{%}" no-reverse "%{%}" ) for color in {000..255}; do - FG[$color]="[38;5;${color}m" - BG[$color]="[48;5;${color}m" + FG[$color]="%{[38;5;${color}m%}" + BG[$color]="%{[48;5;${color}m%}" done From 91add78bdcecee469d6843e0b16f5ac353fd25c1 Mon Sep 17 00:00:00 2001 From: canthiswait Date: Mon, 26 Apr 2010 22:27:32 -0700 Subject: [PATCH 012/108] 256 color theme with bright blue and orange --- themes/sporty_256.zsh-theme | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 themes/sporty_256.zsh-theme diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme new file mode 100644 index 000000000..66c86980c --- /dev/null +++ b/themes/sporty_256.zsh-theme @@ -0,0 +1,13 @@ +# zsh theme requires 256 color enabled terminal +# i.e TERM=xterm-256color +# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ +# based on robbyrussell's shell but louder! + +PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f +%{$fg_bold[white]%}%# %{$reset_color%}' +RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$fg[blue]%}|" From 4155adeefe2c6a941917ece7bbe19bd68950553e Mon Sep 17 00:00:00 2001 From: canthiswait Date: Tue, 27 Apr 2010 00:55:15 -0700 Subject: [PATCH 013/108] Fixed color in last character of clean git info --- themes/sporty_256.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme index 66c86980c..db0fc4277 100644 --- a/themes/sporty_256.zsh-theme +++ b/themes/sporty_256.zsh-theme @@ -10,4 +10,4 @@ RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$fg[blue]%}|" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|" From 447da5816eb2be9c7a79906a484cb78334fd1d7d Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 6 May 2010 21:04:09 -0700 Subject: [PATCH 014/108] Removing rake autocompletion as this is apparently baked into recent versions of zsh --- lib/rake_completion.zsh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/rake_completion.zsh b/lib/rake_completion.zsh index c425a625e..8336182d5 100644 --- a/lib/rake_completion.zsh +++ b/lib/rake_completion.zsh @@ -1,24 +1,3 @@ -_rake_does_task_list_need_generating () { - if [ ! -f .rake_tasks~ ]; then return 0; - else - accurate=$(stat -f%m .rake_tasks~) - changed=$(stat -f%m Rakefile) - return $(expr $accurate '>=' $changed) - fi -} - -_rake () { - if [ -f Rakefile ]; then - if _rake_does_task_list_need_generating; then - echo "\nGenerating .rake_tasks~..." > /dev/stderr - rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~ - fi - compadd `cat .rake_tasks~` - fi -} - -compctl -K _rake rake - function _cap_does_task_list_need_generating () { if [ ! -f .cap_tasks~ ]; then return 0; else From 926d9e8893789e1b70cb4df2144c868f4aa91515 Mon Sep 17 00:00:00 2001 From: kremso Date: Tue, 9 Mar 2010 14:09:08 +0100 Subject: [PATCH 015/108] Don't autoselect first completion entry (Fixes #14) The key here is not using MENU_COMPLETE which autoselects the first entry, but using AUTO_MENU which displays the menu but autoselects on successive tab hit. Also, do not use zstyle menu yes because that somehow overrides the setopts. --- lib/completion.zsh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 46b6d8f65..619dc0243 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -1,11 +1,11 @@ ## fixme - the load process here seems a bit bizarre -setopt noautomenu +unsetopt menu_complete # do not autoselect the first completion entry +unsetopt flowcontrol +setopt auto_menu # show completion menu on succesive tab press setopt complete_in_word setopt always_to_end -unsetopt flowcontrol - WORDCHARS='' autoload -U compinit @@ -23,14 +23,10 @@ fi zstyle ':completion:*' list-colors '' - -unsetopt MENU_COMPLETE -#setopt AUTO_MENU - # should this be in keybindings? bindkey -M menuselect '^o' accept-and-infer-next-history -zstyle ':completion:*:*:*:*:*' menu yes select +zstyle ':completion:*:*:*:*:*' menu select # zstyle ':completion:*:*:*:*:processes' force-list always zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' From 7d036913c4476916fe8b0325ea9cd54266787021 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 6 May 2010 21:13:59 -0700 Subject: [PATCH 016/108] Unsetting config_file after loading config --- oh-my-zsh.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index fa2738e18..a41f3d89e 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -17,3 +17,5 @@ then else /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh fi + +unset config_file \ No newline at end of file From 44cad95ed220a3a3a0c76de15186f395fc6e7ab0 Mon Sep 17 00:00:00 2001 From: Dallas Reedy Date: Fri, 7 May 2010 11:17:12 -0700 Subject: [PATCH 017/108] updated my theme with the date and git branch (+ dirty or not) --- themes/dallas.zsh-theme | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme index 10e019be0..eef32e998 100644 --- a/themes/dallas.zsh-theme +++ b/themes/dallas.zsh-theme @@ -1,14 +1,26 @@ # Personalized! -# [red][normal][purple][yellow][normal] -# dallas@lappy ~/Sites % -# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " -# PROMPT="{white}\{{yellow}{time}{white}\}{green}{host}{white}:{cyan}{pwd} {red,bold}{user}{white}%{normal} " -DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%T%{$fg[white]%}}%{$reset_color%}" +# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T} +DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}" +# Grab the current version of ruby in use (via RVM): [ruby-1.8.7] DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}" +# Grab the current machine name: muscato DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}" -DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~%{$reset_color%}" +# Grab the current filepath, use shortcuts: ~/Desktop +# Append the current git branch, if in a git repository: ~aw@master +DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" +# Grab the current username: dallas DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}" -DALLAS_PROMPT_CHAR_="%{$fg[white]%}%%%{$reset_color%}" +# Use a % for normal users and a # for privelaged (root) users. +DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}" +# For the git prompt, use a white @ and blue text for the branch name +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}" +# Close it all off by resetting the color and styles. +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +# Do nothing if the branch is clean (no changes). +ZSH_THEME_GIT_PROMPT_CLEAN="" +# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch! +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗" +# Put it all together! PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ " From cd9a85500e9ddcb99c3340288b8f02fbed1fa3bb Mon Sep 17 00:00:00 2001 From: Jon Duell Date: Tue, 27 Apr 2010 05:47:02 +0800 Subject: [PATCH 018/108] Adds new duellj theme --- themes/duellj.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/duellj.zsh-theme diff --git a/themes/duellj.zsh-theme b/themes/duellj.zsh-theme new file mode 100644 index 000000000..7350b4335 --- /dev/null +++ b/themes/duellj.zsh-theme @@ -0,0 +1,8 @@ + +# user, host, full path, and time/date +# on two lines for easier vgrepping +# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%} +%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b ' +RPROMPT='[%*]' +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' From 1d03ea53427c0658fc6924aa890c21f6e46c0a80 Mon Sep 17 00:00:00 2001 From: Mario Gutierrez Date: Wed, 21 Apr 2010 19:24:53 +0800 Subject: [PATCH 019/108] my theme --- themes/mgutz.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/mgutz.zsh-theme diff --git a/themes/mgutz.zsh-theme b/themes/mgutz.zsh-theme new file mode 100644 index 000000000..dcf327041 --- /dev/null +++ b/themes/mgutz.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="*]" +ZSH_THEME_GIT_PROMPT_CLEAN="]" From 9efc086fb3140e6e9023f7d8543d5b8231075370 Mon Sep 17 00:00:00 2001 From: Dylan Clendenin Date: Tue, 4 May 2010 02:49:48 +0800 Subject: [PATCH 020/108] two aliases set to 'ss', clobbering rails script/server --- lib/aliases.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index f97daf41a..d891cc0a8 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -21,7 +21,6 @@ alias -- -='cd -' # Super user alias _='sudo' -alias ss='sudo su -' #alias g='grep -in' From e3b9e981538d2bbb9a3c3934419162d1c2a6046e Mon Sep 17 00:00:00 2001 From: Mike Hostetler Date: Wed, 31 Mar 2010 00:21:42 +0800 Subject: [PATCH 021/108] added my theme, based on xiong-chiamiov-plus but using vcs_info instead of just git --- themes/mikeh.zsh-theme | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 themes/mikeh.zsh-theme diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme new file mode 100644 index 000000000..943f04d38 --- /dev/null +++ b/themes/mikeh.zsh-theme @@ -0,0 +1,23 @@ +setopt prompt_subst +autoload colors +colors + +autoload -U add-zsh-hook +autoload -Uz vcs_info + +# check-for-changes can be really slow. +# you should disable it, if you work with large repositories +zstyle ':vcs_info:*:prompt:*' check-for-changes true + +add-zsh-hook precmd mikeh_precmd + +mikeh_precmd() { + vcs_info +} + +# user, host, full path, and time/date +# on two lines for easier vgrepping +# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} +%{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' \ No newline at end of file From 93f9825b79f7dc577d8891f0264fbdc484be80b0 Mon Sep 17 00:00:00 2001 From: Mike Hostetler Date: Wed, 31 Mar 2010 01:31:41 +0800 Subject: [PATCH 022/108] share history with your zsh's on the same host --- lib/history.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/history.zsh b/lib/history.zsh index 527c32762..509be8f09 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -10,3 +10,6 @@ setopt hist_verify setopt inc_append_history setopt extended_history setopt hist_expire_dups_first + +setopt SHARE_HISTORY +setopt APPEND_HISTORY From 36f1f4e51595943d0b8e06a9078aa6f627a9734d Mon Sep 17 00:00:00 2001 From: Matthew Gadd Date: Tue, 6 Apr 2010 08:24:33 +0800 Subject: [PATCH 023/108] Add my oh-my-zsh theme --- themes/dst.zsh-theme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 themes/dst.zsh-theme diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme new file mode 100644 index 000000000..fa0d9cb06 --- /dev/null +++ b/themes/dst.zsh-theme @@ -0,0 +1,16 @@ + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +function prompt_char { + if [ "$(whoami)" = "root" ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi +} + +PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%} +) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) +%_ $(prompt_char) ' + +RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' From 147acd22377d06eb41f4c4368ba33b98c9bbd034 Mon Sep 17 00:00:00 2001 From: dstufft Date: Wed, 24 Mar 2010 08:51:57 +0800 Subject: [PATCH 024/108] added the dstufft theme (based on prose by sjl) --- themes/dstufft.zsh-theme | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 themes/dstufft.zsh-theme diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme new file mode 100644 index 000000000..5a23fcea5 --- /dev/null +++ b/themes/dstufft.zsh-theme @@ -0,0 +1,19 @@ +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '±' && return + hg root >/dev/null 2>/dev/null && echo 'Hg' && return + echo '○' +} + +function virtualenv_info { + [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' +} + +PROMPT=' +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) +$(virtualenv_info)$(prompt_char) ' + +ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" +ZSH_THEME_GIT_PROMPT_CLEAN="" From 08a90297fe7c1105253619e42f0fb07a2538db21 Mon Sep 17 00:00:00 2001 From: Ryan McCuaig Date: Fri, 16 Apr 2010 08:22:50 +0800 Subject: [PATCH 025/108] Add my preferred prompt --- themes/rgm.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/rgm.zsh-theme diff --git a/themes/rgm.zsh-theme b/themes/rgm.zsh-theme new file mode 100644 index 000000000..9452a8b0d --- /dev/null +++ b/themes/rgm.zsh-theme @@ -0,0 +1,8 @@ +PROMPT=' +%n@%m %{$fg[cyan]%}%~ +%? $(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" From 458da5895a5fd13823545c187cf64436b39c8266 Mon Sep 17 00:00:00 2001 From: Christopher Chow Date: Fri, 30 Apr 2010 16:36:03 +0800 Subject: [PATCH 026/108] Added my own theme. --- themes/Soliah.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/Soliah.zsh-theme diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme new file mode 100644 index 000000000..7ad876d41 --- /dev/null +++ b/themes/Soliah.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg[blue]%}%B%20~%b%{$reset_color%}%{$(git_prompt_info)%} $ ' + +ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" +ZSH_THEME_GIT_PROMPT_DIRTY="*%{$reset_color%}" + From 6213f3304f945b56dfea30d6e11e4c860afdbbc9 Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Wed, 5 May 2010 04:19:09 +0800 Subject: [PATCH 027/108] my WIP theme --- themes/afowler.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/afowler.zsh-theme diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme new file mode 100644 index 000000000..f82e7bc25 --- /dev/null +++ b/themes/afowler.zsh-theme @@ -0,0 +1,8 @@ +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg[blue]}%}»%{${reset_color}%} ' + +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" From a649b2d410e3f3cd2b5749d199da03168d0c3920 Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Wed, 5 May 2010 04:58:10 +0800 Subject: [PATCH 028/108] happy with my theme. caret turns red for root --- themes/afowler.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme index f82e7bc25..b5a9bb173 100644 --- a/themes/afowler.zsh-theme +++ b/themes/afowler.zsh-theme @@ -1,6 +1,8 @@ +if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi + local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg[blue]}%}»%{${reset_color}%} ' +PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' RPS1="${return_code}" From d8a10dbba5cff634193a9a957833ad0f395d7a7d Mon Sep 17 00:00:00 2001 From: Parker McGee Date: Fri, 30 Apr 2010 00:12:26 +0800 Subject: [PATCH 029/108] added my own theme --- themes/pmcgee.zsh-theme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 themes/pmcgee.zsh-theme diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme new file mode 100644 index 000000000..4eb54df5b --- /dev/null +++ b/themes/pmcgee.zsh-theme @@ -0,0 +1,16 @@ +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi + +PROMPT=' +%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%} +$(git_prompt_info)%(!.#.$) ' +RPROMPT='[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' From 97aac4acb5913a042a12a4797f5cc1894f2e21f5 Mon Sep 17 00:00:00 2001 From: Dave Verwer Date: Thu, 22 Apr 2010 17:32:36 +0800 Subject: [PATCH 030/108] New theme "daveverwer", based on "geoffgarside". --- themes/daveverwer.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/daveverwer.zsh-theme diff --git a/themes/daveverwer.zsh-theme b/themes/daveverwer.zsh-theme new file mode 100644 index 000000000..89aef926e --- /dev/null +++ b/themes/daveverwer.zsh-theme @@ -0,0 +1,7 @@ +# Copied and modified from the oh-my-zsh theme from geoffgarside +# Red server name, green cwd, blue git status + +PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" From 081deba3c4971a2a9af8c185f01ee9ea6754fdcb Mon Sep 17 00:00:00 2001 From: Edvard Majakari Date: Wed, 14 Apr 2010 04:44:51 +0800 Subject: [PATCH 031/108] added my theme --- themes/edvardm.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/edvardm.zsh-theme diff --git a/themes/edvardm.zsh-theme b/themes/edvardm.zsh-theme new file mode 100644 index 000000000..f9ca1a9e2 --- /dev/null +++ b/themes/edvardm.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From 456834b9ea5aca1a7727f7070681e5d0336e3893 Mon Sep 17 00:00:00 2001 From: Doug Fritz Date: Sat, 3 Apr 2010 15:48:35 +0800 Subject: [PATCH 032/108] added skaro theme --- themes/skaro.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/skaro.zsh-theme diff --git a/themes/skaro.zsh-theme b/themes/skaro.zsh-theme new file mode 100644 index 000000000..84b7b11b0 --- /dev/null +++ b/themes/skaro.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}» ' + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" + From 5a3bde78d804a0c20a18f7de02e60f1c835a3f28 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Fri, 7 May 2010 15:35:03 -0700 Subject: [PATCH 033/108] Sprinkling some candy on this muffin. --- tools/install.sh | 9 ++++++++- tools/upgrade.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 5a7c00950..004b252f4 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,6 +24,13 @@ echo "export PATH=$PATH" >> ~/.zshrc echo "Time to change your default shell to zsh!" chsh -s /bin/zsh -echo "Hooray! Oh My Zsh has been installed." +echo ' __ __ ' +echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' +echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' +echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' +echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' +echo ' /____/' + +echo "\n\n ....is now installed." /bin/zsh source ~/.zshrc diff --git a/tools/upgrade.sh b/tools/upgrade.sh index f749404e9..6dee42c25 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -2,4 +2,5 @@ current_path=`pwd` echo "Upgrading Oh My Zsh" ( cd $ZSH && git pull origin master ) echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session." +echo "To keep up on the latest, be sure to follow Oh My Zsh on twitter: http://twitter.com/ohmyzsh" cd $current_path \ No newline at end of file From 0a2a981dfeadf0e8cfcf361e792a3e3872f1aef4 Mon Sep 17 00:00:00 2001 From: Hayes Williams Date: Wed, 26 May 2010 21:49:55 -0700 Subject: [PATCH 034/108] Adds a new theme that only seems to work on Linux --- themes/linuxonly | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 themes/linuxonly diff --git a/themes/linuxonly b/themes/linuxonly new file mode 100644 index 000000000..a11b80d7f --- /dev/null +++ b/themes/linuxonly @@ -0,0 +1,80 @@ +# vim: set ts=2 textwidth=0 + +autoload -U add-zsh-hook +autoload -Uz vcs_info +local c0=$(printf "\033[0m") +local c1=$(printf "\033[38;5;215m") +local c2=$(printf "\033[38;5;209m") +local c3=$(printf "\033[38;5;203m") +local c4=$(printf "\033[33;4m") +local c5=$(printf "\033[38;5;137m") +local c6=$(printf "\033[38;5;240m") +local c7=$(printf "\033[38;5;149m") +local c8=$(printf "\033[38;5;126m") +local c9=$(printf "\033[38;5;162m") + +local foopath=$(perl /home/scp1/bin/foopath) + +if [ "$TERM" = "linux" ]; then + c1=$(printf "\033[34;1m") + c2=$(printf "\033[35m") + c3=$(printf "\033[31m") + c4=$(printf "\033[31;1m") + c5=$(printf "\033[32m") + c6=$(printf "\033[32;1m") + c7=$(printf "\033[33m") + c8=$(printf "\033[33;1m") + c9=$(printf "\033[34m") +fi + +#local newtv=$(perl $HOME/devel/newtv.pl) +local newtv='' + +zstyle ':vcs_info:*' actionformats \ + '%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' +zstyle ':vcs_info:*' formats \ + "%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f " +zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' +zstyle ':vcs_info:*' enable git + +add-zsh-hook precmd prompt_jnrowe_precmd + +prompt_jnrowe_precmd () { + vcs_info + + if [ "${vcs_info_msg_0_}" = "" ]; then + #dir_status="|%F{3}%n%F{7}@%F{3}%m%F{7}:%F{9}%l%f" + #dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/" + dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" + #dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})" + + PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%} +> ' + elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then + dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" + PROMPT='${vcs_info_msg_0_} +%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} +> ' + + elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then + dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" + + PROMPT='${vcs_info_msg_0_} +%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} +%{$c9%}·>%{$c0%} ' + else + dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" + PROMPT='${vcs_info_msg_0_} +%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} +> ' + + fi +} + + +#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%} ${vcs_info_msg_0_}${dir_status}%{$reset_color%} +#> ' + +# vim: set ft=zsh ts=4 sw=4 et: + + From 8247cbf8b56ebd5915813bb1fafb72e71fc06c8f Mon Sep 17 00:00:00 2001 From: lunks Date: Fri, 14 May 2010 04:42:24 +0800 Subject: [PATCH 035/108] modified macovsky to support ruby version --- themes/macovsky.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme index db7f9148c..4eb410233 100644 --- a/themes/macovsky.zsh-theme +++ b/themes/macovsky.zsh-theme @@ -1,8 +1,8 @@ # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[green]%}%~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' +PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' RPS1="${return_code}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" \ No newline at end of file +ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" From f02c9560b3089fae2639a466ea39263553619df5 Mon Sep 17 00:00:00 2001 From: lunks Date: Fri, 14 May 2010 07:15:31 +0800 Subject: [PATCH 036/108] macowsky modified theme with ruby version on prompt --- themes/macovsky-ruby.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/macovsky-ruby.zsh-theme diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme new file mode 100644 index 000000000..4eb410233 --- /dev/null +++ b/themes/macovsky-ruby.zsh-theme @@ -0,0 +1,8 @@ +# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" From ba9c78fc9b83752e970f7a1bc1b16a582672bd58 Mon Sep 17 00:00:00 2001 From: Alan Harper Date: Wed, 19 May 2010 14:53:16 +0800 Subject: [PATCH 037/108] Import rvm prompt --- lib/rvm.zsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/rvm.zsh diff --git a/lib/rvm.zsh b/lib/rvm.zsh new file mode 100644 index 000000000..597be1b33 --- /dev/null +++ b/lib/rvm.zsh @@ -0,0 +1,7 @@ +# get the name of the branch we are on +function rvm_prompt_info() { + ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return + echo "($ruby_version)" +} + + From 0dbfeb9c23cfd3bffd2f744a5db17c3613ea44d2 Mon Sep 17 00:00:00 2001 From: Alan Harper Date: Wed, 19 May 2010 14:53:38 +0800 Subject: [PATCH 038/108] aussiegeek theme (include showing rvm prompt) --- themes/aussiegeek.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/aussiegeek.zsh-theme diff --git a/themes/aussiegeek.zsh-theme b/themes/aussiegeek.zsh-theme new file mode 100644 index 000000000..c2c7f65b9 --- /dev/null +++ b/themes/aussiegeek.zsh-theme @@ -0,0 +1,8 @@ + +PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color + $ ' +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green](" +ZSH_THEME_GIT_PROMPT_SUFFIX=")" +ZSH_THEME_GIT_PROMPT_CLEAN="✔" +ZSH_THEME_GIT_PROMPT_DIRTY="✗" From f2f34f5404e8ab674a0e345a709783b6c56a3b72 Mon Sep 17 00:00:00 2001 From: Thomas J Bradley Date: Thu, 27 May 2010 06:37:52 +0800 Subject: [PATCH 039/108] Added my zsh theme file, heavily based on sjl's --- themes/thomasjbradley.zsh-theme | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 themes/thomasjbradley.zsh-theme diff --git a/themes/thomasjbradley.zsh-theme b/themes/thomasjbradley.zsh-theme new file mode 100644 index 000000000..857301d19 --- /dev/null +++ b/themes/thomasjbradley.zsh-theme @@ -0,0 +1,29 @@ +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '±' && return + hg root >/dev/null 2>/dev/null && echo '☿' && return + echo '○' +} + +function virtualenv_info { + [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' +} + +function hg_prompt_info { + hg prompt --angle-brackets "\ +< on %{$fg[magenta]%}%{$reset_color%}>\ +< at %{$fg[yellow]%}%{$reset_color%}>\ +%{$fg[green]%}%{$reset_color%}< +patches: >" 2>/dev/null +} + +PROMPT=' +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +$(virtualenv_info)$(prompt_char) ' + +ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +. ~/bin/dotfiles/zsh/aliases From c5c870ac0556467a1b21f4298fda6aeefcc93ecd Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Fri, 28 May 2010 03:20:27 +0800 Subject: [PATCH 040/108] Added customized version of the wezm theme (mainly added username/host in the prompt). --- themes/wezm+.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/wezm+.zsh-theme diff --git a/themes/wezm+.zsh-theme b/themes/wezm+.zsh-theme new file mode 100644 index 000000000..fee3eb08e --- /dev/null +++ b/themes/wezm+.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%{${fg_bold[yellow]}%}%n%{$reset_color%}%{${fg[yellow]}%}@%m%{$reset_color%} $(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' +RPROMPT='%{$fg[green]%}%~%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From eb0f3c0234e88bbbf5ca014ace8d8d801207c222 Mon Sep 17 00:00:00 2001 From: Joseph Bergantine Date: Mon, 24 May 2010 04:03:27 +0800 Subject: [PATCH 041/108] adding my zsh theme -- only difference from robby's being that i'm using white instead of blue for legibility over brown --- themes/jbergantine.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/jbergantine.zsh-theme diff --git a/themes/jbergantine.zsh-theme b/themes/jbergantine.zsh-theme new file mode 100644 index 000000000..d84247cff --- /dev/null +++ b/themes/jbergantine.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%})" From 81aa74b73cc221b5050e28ccf35d29317812edf9 Mon Sep 17 00:00:00 2001 From: MasterLambaster Date: Mon, 31 May 2010 17:09:45 +0800 Subject: [PATCH 042/108] Eastwood theme with optional RVM support --- themes/eastwood.zsh-theme | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 themes/eastwood.zsh-theme diff --git a/themes/eastwood.zsh-theme b/themes/eastwood.zsh-theme new file mode 100644 index 000000000..83664515a --- /dev/null +++ b/themes/eastwood.zsh-theme @@ -0,0 +1,19 @@ +#RVM settings +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" +fi + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +#Customized git status, oh-my-zsh currently does not allow render dirty status before branch +git_custom_status() { + local cb=$(current_branch) + if [ -n "$cb" ]; then + echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + fi +} + +PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b ' From 3cf9ab722e7c0829727f548c7d05a0d96055f707 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:03:26 -0700 Subject: [PATCH 043/108] Initial implementation of a new plugin system, so that people can managed which aliases/functions they want. --- lib/aliases.zsh | 28 ---------------------------- lib/functions.zsh | 21 --------------------- lib/git.zsh | 15 --------------- oh-my-zsh.sh | 4 ++++ plugins/git.plugin.zsh | 21 +++++++++++++++++++++ plugins/lighthouse.plugin.zsh | 16 ++++++++++++++++ plugins/rails.plugin.zsh | 10 ++++++++++ plugins/ruby.plugin.zsh | 4 ++++ plugins/textmate.plugin.zsh | 14 ++++++++++++++ 9 files changed, 69 insertions(+), 64 deletions(-) create mode 100644 plugins/git.plugin.zsh create mode 100644 plugins/lighthouse.plugin.zsh create mode 100644 plugins/rails.plugin.zsh create mode 100644 plugins/ruby.plugin.zsh create mode 100644 plugins/textmate.plugin.zsh diff --git a/lib/aliases.zsh b/lib/aliases.zsh index d891cc0a8..89c904a7e 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -1,19 +1,7 @@ -#!/bin/zsh - # Push and pop directories on directory stack alias pu='pushd' alias po='popd' -alias ss='thin --stats "/thin/stats" start' -alias sg='ruby script/generate' -alias sd='ruby script/destroy' -alias sp='ruby script/plugin' -alias ssp='ruby script/spec' -alias rdbm='rake db:migrate' -alias sc='ruby script/console' -alias sd='ruby script/server --debugger' -alias devlog='tail -f log/development.log' - # Basic directory operations alias .='pwd' alias ...='cd ../..' @@ -33,20 +21,4 @@ alias l='ls -la' alias ll='ls -alr' alias sl=ls # often screw this up -alias sgem='sudo gem' - -# Find ruby file -alias rfind='find . -name *.rb | xargs grep -n' alias afind='ack-grep -il' - -# Git and svn mix -alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' - -# TextMate -alias et='mate . &' -alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' -alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' -alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' - -# Editor Ruby file in TextMate -alias mr='mate CHANGELOG app config db lib public script spec test' diff --git a/lib/functions.zsh b/lib/functions.zsh index 74b93f00e..35c3f3ce7 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -54,24 +54,3 @@ function take() { cd $1 } -function tm() { - cd $1 - mate $1 -} - -# To use: add a .lighthouse file into your directory with the URL to the -# individual project. For example: -# https://rails.lighthouseapp.com/projects/8994 -# Example usage: http://screencast.com/t/ZDgwNDUwNT -open_lighthouse_ticket () { - if [ ! -f .lighthouse-url ]; then - echo "There is no .lighthouse file in the current directory..." - return 0; - else - lighthouse_url=$(cat .lighthouse-url); - echo "Opening ticket #$1"; - `open $lighthouse_url/tickets/$1`; - fi -} - -alias lho='open_lighthouse_ticket' diff --git a/lib/git.zsh b/lib/git.zsh index 1d1d24deb..a54e5bcbb 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -20,18 +20,3 @@ function current_branch() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return echo ${ref#refs/heads/} } - -# Aliases -alias g='git' -alias gst='git status' -alias gl='git pull' -alias gup='git fetch && git rebase' -alias gp='git push' -alias gd='git diff | mate' -alias gdv='git diff -w "$@" | vim -R -' -alias gc='git commit -v' -alias gca='git commit -v -a' -alias gb='git branch' -alias gba='git branch -a' -alias gcount='git shortlog -sn' -alias gcp='git cherry-pick' diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index a41f3d89e..bb45c71eb 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -10,6 +10,10 @@ for config_file ($ZSH/lib/*.zsh) source $config_file # Load all of your custom configurations from custom/ for config_file ($ZSH/custom/*.zsh) source $config_file +# Load all of the plugins that were defined in ~/.zshrc +plugin=${plugin:=()} +for plugin ($plugins) source $ZSH/plugins/$plugin.plugin.zsh + # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" = "true" ] then diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh new file mode 100644 index 000000000..26777a62a --- /dev/null +++ b/plugins/git.plugin.zsh @@ -0,0 +1,21 @@ +# Aliases +alias g='git' +alias gst='git status' +alias gl='git pull' +alias gup='git fetch && git rebase' +alias gp='git push' +alias gd='git diff | mate' +alias gdv='git diff -w "$@" | vim -R -' +alias gc='git commit -v' +alias gca='git commit -v -a' +alias gb='git branch' +alias gba='git branch -a' +alias gcount='git shortlog -sn' +alias gcp='git cherry-pick' + + +# Git and svn mix +alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' + +alias ggpull='git pull origin $(current_branch)' +alias ggpush='git push origin $(current_branch)' diff --git a/plugins/lighthouse.plugin.zsh b/plugins/lighthouse.plugin.zsh new file mode 100644 index 000000000..4eb06a997 --- /dev/null +++ b/plugins/lighthouse.plugin.zsh @@ -0,0 +1,16 @@ +# To use: add a .lighthouse file into your directory with the URL to the +# individual project. For example: +# https://rails.lighthouseapp.com/projects/8994 +# Example usage: http://screencast.com/t/ZDgwNDUwNT +open_lighthouse_ticket () { + if [ ! -f .lighthouse-url ]; then + echo "There is no .lighthouse file in the current directory..." + return 0; + else + lighthouse_url=$(cat .lighthouse-url); + echo "Opening ticket #$1"; + `open $lighthouse_url/tickets/$1`; + fi +} + +alias lho='open_lighthouse_ticket' \ No newline at end of file diff --git a/plugins/rails.plugin.zsh b/plugins/rails.plugin.zsh new file mode 100644 index 000000000..fb21da846 --- /dev/null +++ b/plugins/rails.plugin.zsh @@ -0,0 +1,10 @@ + +alias ss='thin --stats "/thin/stats" start' +alias sg='ruby script/generate' +alias sd='ruby script/destroy' +alias sp='ruby script/plugin' +alias ssp='ruby script/spec' +alias rdbm='rake db:migrate' +alias sc='ruby script/console' +alias sd='ruby script/server --debugger' +alias devlog='tail -f log/development.log' \ No newline at end of file diff --git a/plugins/ruby.plugin.zsh b/plugins/ruby.plugin.zsh new file mode 100644 index 000000000..82bf5d49d --- /dev/null +++ b/plugins/ruby.plugin.zsh @@ -0,0 +1,4 @@ +alias sgem='sudo gem' + +# Find ruby file +alias rfind='find . -name *.rb | xargs grep -n' \ No newline at end of file diff --git a/plugins/textmate.plugin.zsh b/plugins/textmate.plugin.zsh new file mode 100644 index 000000000..7b73e2751 --- /dev/null +++ b/plugins/textmate.plugin.zsh @@ -0,0 +1,14 @@ + +# TextMate +alias et='mate . &' +alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' +alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' +alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' + +# Editor Ruby file in TextMate +alias mr='mate CHANGELOG app config db lib public script spec test' + +function tm() { + cd $1 + mate $1 +} From 31dace882969e04e0256dac4ddb333f648707106 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:05:12 -0700 Subject: [PATCH 044/108] Updating default .zshrc template file to include plugins declaration --- templates/zshrc.zsh-template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index d905be04b..8022b3506 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -14,6 +14,10 @@ export ZSH_THEME="robbyrussell" # Uncomment following line if you want to disable colors in ls # export DISABLE_LS_COLORS="true" +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Example format: plugins=(rails git textmate ruby lighthouse) +plugins=(git) + source $ZSH/oh-my-zsh.sh # Customize to your needs... From c21d3775a9663daf69133ae8dcd0a2697ef694fa Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:32:55 -0700 Subject: [PATCH 045/108] Moving capistrano functions to rails plugin --- plugins/rails.plugin.zsh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/plugins/rails.plugin.zsh b/plugins/rails.plugin.zsh index fb21da846..b7f62a0c6 100644 --- a/plugins/rails.plugin.zsh +++ b/plugins/rails.plugin.zsh @@ -7,4 +7,26 @@ alias ssp='ruby script/spec' alias rdbm='rake db:migrate' alias sc='ruby script/console' alias sd='ruby script/server --debugger' -alias devlog='tail -f log/development.log' \ No newline at end of file +alias devlog='tail -f log/development.log' + +function _cap_does_task_list_need_generating () { + if [ ! -f .cap_tasks~ ]; then return 0; + else + accurate=$(stat -f%m .cap_tasks~) + changed=$(stat -f%m config/deploy.rb) + return $(expr $accurate '>=' $changed) + fi +} + +function _cap () { + if [ -f config/deploy.rb ]; then + if _cap_does_task_list_need_generating; then + echo "\nGenerating .cap_tasks~..." > /dev/stderr + cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' +> .cap_tasks~ + fi + compadd `cat .cap_tasks~` + fi +} + +compctl -K _cap cap From ab2c0744abc648da9c35dc52f4c0b3c0623b989d Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:33:15 -0700 Subject: [PATCH 046/108] Removing rake completion from lib/ as it was moved to rails plugin --- lib/rake_completion.zsh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 lib/rake_completion.zsh diff --git a/lib/rake_completion.zsh b/lib/rake_completion.zsh deleted file mode 100644 index 8336182d5..000000000 --- a/lib/rake_completion.zsh +++ /dev/null @@ -1,21 +0,0 @@ -function _cap_does_task_list_need_generating () { - if [ ! -f .cap_tasks~ ]; then return 0; - else - accurate=$(stat -f%m .cap_tasks~) - changed=$(stat -f%m config/deploy.rb) - return $(expr $accurate '>=' $changed) - fi -} - -function _cap () { - if [ -f config/deploy.rb ]; then - if _cap_does_task_list_need_generating; then - echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' -> .cap_tasks~ - fi - compadd `cat .cap_tasks~` - fi -} - -compctl -K _cap cap From 455669e97606bb512b9f69fc1ed9b8fea5105a33 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:54:40 -0700 Subject: [PATCH 047/108] Removing legacy completion code --- lib/completion.zsh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b627ef878..cba90179f 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -27,8 +27,6 @@ zstyle ':completion:*' list-colors '' bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu select -# zstyle ':completion:*:*:*:*:processes' force-list always - zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" @@ -37,9 +35,3 @@ if [ -f ~/.ssh/known_hosts ]; then zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts` fi - -# Complete on history -#zstyle ':completion:*:history-words' stop yes -#zstyle ':completion:*:history-words' remove-all-dups yes -#zstyle ':completion:*:history-words' list false -#zstyle ':completion:*:history-words' menu yes From 89bd2bf317fe458c6a6154824823670dd2d32660 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:55:07 -0700 Subject: [PATCH 048/108] Moving some rails and osx-specific functions to their corresponding plugin files --- lib/functions.zsh | 16 ---------------- plugins/osx.plugin.zsh | 11 +++++++++++ plugins/rails.plugin.zsh | 4 ++++ 3 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 plugins/osx.plugin.zsh diff --git a/lib/functions.zsh b/lib/functions.zsh index 35c3f3ce7..fcbe994be 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -21,10 +21,6 @@ function preexec { title $cmd[1]:t "$cmd[2,-1]" } -function remote_console() { - /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" -} - function zsh_stats() { history | awk '{print $2}' | sort | uniq -c | sort -rn | head } @@ -37,18 +33,6 @@ function upgrade_oh_my_zsh() { /bin/sh $ZSH/tools/upgrade.sh } -function tab() { - osascript 2>/dev/null </dev/null < Date: Thu, 3 Jun 2010 12:56:11 -0700 Subject: [PATCH 049/108] Moving current_branch() to git plugin --- lib/git.zsh | 9 --------- plugins/git.plugin.zsh | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index a54e5bcbb..889dd98df 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -11,12 +11,3 @@ parse_git_dirty () { echo "$ZSH_THEME_GIT_PROMPT_CLEAN" fi } - -# -# Will return the current branch name -# Usage example: git pull origin $(current_branch) -# -function current_branch() { - ref=$(git symbolic-ref HEAD 2> /dev/null) || return - echo ${ref#refs/heads/} -} diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh index 26777a62a..e0d967056 100644 --- a/plugins/git.plugin.zsh +++ b/plugins/git.plugin.zsh @@ -17,5 +17,15 @@ alias gcp='git cherry-pick' # Git and svn mix alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' +# +# Will return the current branch name +# Usage example: git pull origin $(current_branch) +# +function current_branch() { + ref=$(git symbolic-ref HEAD 2> /dev/null) || return + echo ${ref#refs/heads/} +} + +# these aliases take advangate of the previous function alias ggpull='git pull origin $(current_branch)' alias ggpush='git push origin $(current_branch)' From dea166411f134b33ae36c4ec4c51e71248dfa2a3 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 12:59:49 -0700 Subject: [PATCH 050/108] Moving brew functions to it's own plugin --- functions/_brew => plugins/brew.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename functions/_brew => plugins/brew.plugin.zsh (100%) diff --git a/functions/_brew b/plugins/brew.plugin.zsh similarity index 100% rename from functions/_brew rename to plugins/brew.plugin.zsh From 59bfd87e08c127e6aacf473e99d2ebbc20e633ff Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 3 Jun 2010 13:01:41 -0700 Subject: [PATCH 051/108] Adding some candy to the upgrade script --- tools/upgrade.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 6dee42c25..6bdd02e38 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,6 +1,12 @@ current_path=`pwd` echo "Upgrading Oh My Zsh" ( cd $ZSH && git pull origin master ) +echo ' __ __ ' +echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' +echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' +echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' +echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' +echo ' /____/' echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session." echo "To keep up on the latest, be sure to follow Oh My Zsh on twitter: http://twitter.com/ohmyzsh" cd $current_path \ No newline at end of file From 6774490a467016db70e9ec1ddd1bab6fe37a722a Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sun, 9 May 2010 21:17:20 +0800 Subject: [PATCH 052/108] Don't auto-correct ebuild commands. It breaks "ebuild manifest", as there are Manifest files in the directory. --- lib/correction.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/correction.zsh b/lib/correction.zsh index a96f7ffd8..043320a6d 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -6,3 +6,4 @@ alias mysql='nocorrect mysql' alias mkdir='nocorrect mkdir' alias gist='nocorrect gist' alias heroku='nocorrect heroku' +alias ebuild='nocorrect ebuild' From edc8e3d092bc758fa9dd4f3472d2c6ec9d03b737 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sun, 9 May 2010 21:16:33 +0800 Subject: [PATCH 053/108] Ignore commands that start with a space. This is useful when you want to use a dangerous command, as it won't be available with history searching. --- lib/history.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/history.zsh b/lib/history.zsh index 509be8f09..ca6f57079 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -10,6 +10,7 @@ setopt hist_verify setopt inc_append_history setopt extended_history setopt hist_expire_dups_first +setopt hist_ignore_space setopt SHARE_HISTORY setopt APPEND_HISTORY From f9fbd079832637c192e35fe65532495a37a3e3d3 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sun, 9 May 2010 22:23:11 +0800 Subject: [PATCH 054/108] Don't display dotfiles or reverse sort with ll alias. The ll alias is a very common default for bash in Linux distributions, so use that definition. --- lib/aliases.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 89c904a7e..80760a1f5 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -18,7 +18,7 @@ alias history='fc -l 1' # List direcory contents alias lsa='ls -lah' alias l='ls -la' -alias ll='ls -alr' +alias ll='ls -l' alias sl=ls # often screw this up alias afind='ack-grep -il' From 3bc73012041c8762fa0276c6e02ac46fb3698a32 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 12 Nov 2009 14:52:53 +0800 Subject: [PATCH 055/108] Added a minimum zsh version note. --- README.textile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.textile b/README.textile index 950f8861b..23d8b5390 100644 --- a/README.textile +++ b/README.textile @@ -4,6 +4,8 @@ bq. "OH MY ZSHELL!" h2. Setup +@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. + h3. The automatic installer... (do you trust me?) @wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ From 6efc79c74edbc8cfbb5cdc438332eeae9b950508 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sun, 22 Nov 2009 01:38:55 +0800 Subject: [PATCH 056/108] Don't correct hpodder commands. --- lib/correction.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/correction.zsh b/lib/correction.zsh index 043320a6d..fc60dcdbd 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -7,3 +7,4 @@ alias mkdir='nocorrect mkdir' alias gist='nocorrect gist' alias heroku='nocorrect heroku' alias ebuild='nocorrect ebuild' +alias hpodder='nocorrect hpodder' From 47e9914529e0807681c3c6dd2c11187ee67f0326 Mon Sep 17 00:00:00 2001 From: Takashi Yoshida Date: Mon, 31 May 2010 00:56:26 +0800 Subject: [PATCH 057/108] Added my own theme. --- themes/takashiyoshida.zsh-theme | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 themes/takashiyoshida.zsh-theme diff --git a/themes/takashiyoshida.zsh-theme b/themes/takashiyoshida.zsh-theme new file mode 100644 index 000000000..419a8cf3f --- /dev/null +++ b/themes/takashiyoshida.zsh-theme @@ -0,0 +1,27 @@ +# +# PROMPT +# +PROMPT_BRACKET_BEGIN='%{$fg_bold[white]%}[' +PROMPT_HOST='%{$fg_bold[cyan]%}%m' +PROMPT_SEPARATOR='%{$reset_color%}:' +PROMPT_DIR='%{$fg_bold[yellow]%}%c' +PROMPT_BRACKET_END='%{$fg_bold[white]%}]' + +PROMPT_USER='%{$fg_bold[white]%}%n' +PROMPT_SIGN='%{$reset_color%}%#' + +GIT_PROMPT_INFO='$(git_prompt_info)' + +# My current prompt looks like: +# [host:current_dir] (git_prompt_info) +# [username]% +PROMPT="${PROMPT_BRACKET_BEGIN}${PROMPT_HOST}${PROMPT_SEPARATOR}${PROMPT_DIR}${PROMPT_BRACKET_END}${GIT_PROMPT_INFO} +${PROMPT_BRACKET_BEGIN}${PROMPT_USER}${PROMPT_BRACKET_END}${PROMPT_SIGN} " + +# +# Git repository +# +ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_GIT_PROMPT_CLEAN='' From 6bb13632f538db339520ab2b46794006a405430f Mon Sep 17 00:00:00 2001 From: Tobias Birmili Date: Sun, 6 Jun 2010 18:42:25 +0800 Subject: [PATCH 058/108] added plugin to control macports mysql-server installation --- plugins/mysql-macports.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/mysql-macports.plugin.zsh diff --git a/plugins/mysql-macports.plugin.zsh b/plugins/mysql-macports.plugin.zsh new file mode 100644 index 000000000..63b881c9f --- /dev/null +++ b/plugins/mysql-macports.plugin.zsh @@ -0,0 +1,6 @@ +# commands to control local mysql-server installation +# paths are for osx installtion via macports + +alias mysqlstart='sudo /opt/local/bin/mysqld_safe5' +alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' +alias mysqlstatus='mysqladmin5 -u root -p ping' \ No newline at end of file From b26ff059653716fd38d1813b797572bbec718c16 Mon Sep 17 00:00:00 2001 From: toabi Date: Sun, 6 Jun 2010 22:14:13 +0800 Subject: [PATCH 059/108] updated the readme --- README.textile | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/README.textile b/README.textile index 23d8b5390..8b1b6875a 100644 --- a/README.textile +++ b/README.textile @@ -27,22 +27,19 @@ h3. The manual way @chsh -s /bin/zsh@ -4. Start / restart zsh (open a new terminal is easy enough..) +4. Start / restart zsh (open a new terminal is easy enough...) h3. Problems? -You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to oh-my-zsh. +You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. h2. Usage -TODO: Update this.. - -* Rake autocomplete: @rake (tab)@. Will generate a cache of all your rake tasks and then let you auto-complete and/or select the task to run. -* ssh autocomplete: @ssh (tab)@ or @scp (tab)@ -* Git branch, it'll tell you which branch you're in when you're in a git repository directory. +* enable the plugins you want in your @~/.zshrc@ (take a look at @plugins/@ to see what's possible) +** example: @plugins=(git osx ruby)@ * Theme support: Change the @ZSH_THEME@ environment variable in @~/.zshrc@. -** Take a look at the "current themes":http://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with Oh My Zsh. -* much much more.. +** Take a look at the "current themes":http://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with _Oh My Zsh_. +* much much more... take a look at @lib/@ what _Oh My Zsh_ offers... h2. Useful @@ -51,6 +48,7 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo h3. Customization If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. +If you have many functions which go good together you can put them as a *.plugin.zsh file in the @plugin/@ directory and then enable this plugin. h3. Uninstalling @@ -68,8 +66,4 @@ I'm far from being a zsh-expert and suspect there are many ways to improve. If y h3. Send us your theme! -I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory. - -h3. Todo from imajes: - -* need to make the title bar support git folder \ No newline at end of file +I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory. \ No newline at end of file From 7f350da5b74c65ed99766c8ebd5137aee9479225 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 10 Jun 2010 07:50:13 -0700 Subject: [PATCH 060/108] Adding a ggpnp which does a git pull followed by a git push. --- plugins/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh index e0d967056..655eaf728 100644 --- a/plugins/git.plugin.zsh +++ b/plugins/git.plugin.zsh @@ -29,3 +29,4 @@ function current_branch() { # these aliases take advangate of the previous function alias ggpull='git pull origin $(current_branch)' alias ggpush='git push origin $(current_branch)' +alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' \ No newline at end of file From 5b8bc7aeebdf5f28da811a29bdcdf41e0f08c218 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 16 Aug 2010 21:47:21 +0200 Subject: [PATCH 061/108] add candy theme --- themes/candy.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/candy.zsh-theme diff --git a/themes/candy.zsh-theme b/themes/candy.zsh-theme new file mode 100644 index 000000000..bc125c5ce --- /dev/null +++ b/themes/candy.zsh-theme @@ -0,0 +1,7 @@ +PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ +%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" From eb14ee1c630a4ae02234e78eabf3e8416dc9d977 Mon Sep 17 00:00:00 2001 From: Josh Price Date: Tue, 17 Aug 2010 22:45:10 +1000 Subject: [PATCH 062/108] Added my own theme based on pat's --- themes/josh.zsh-theme | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 themes/josh.zsh-theme diff --git a/themes/josh.zsh-theme b/themes/josh.zsh-theme new file mode 100644 index 000000000..9d59bd91e --- /dev/null +++ b/themes/josh.zsh-theme @@ -0,0 +1,43 @@ +grey='\e[0;90m' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" + +function pat_prompt { + (( spare_width = ${COLUMNS} )) + prompt=" " + + branch=$(current_branch) + ruby_version=$(rvm_prompt_info) + path_size=${#PWD} + branch_size=${#branch} + ruby_size=${#ruby_version} + machine_size=11 + + if [[ ${#branch} -eq 0 ]] + then (( ruby_size = ruby_size + 1 )) + else + (( branch_size = branch_size + 4 )) + if [[ -n $(git status -s 2> /dev/null) ]]; then + (( branch_size = branch_size + 2 )) + fi + fi + + (( spare_width = ${spare_width} - (${machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) )) + + while [ ${#prompt} -lt $spare_width ]; do + prompt=" $prompt" + done + + prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)" + + echo $prompt +} + +setopt prompt_subst + +PROMPT=' +%n@%m $(pat_prompt) +%(?,%{%F{green}%},%{%F{red}%})⚡%{$reset_color%} ' From 1582570919b5bed145d38d1d60ae8572f4552f25 Mon Sep 17 00:00:00 2001 From: Josh Price Date: Tue, 17 Aug 2010 23:22:26 +1000 Subject: [PATCH 063/108] Made the user_machine_size calculation generic. Pwned the function name. --- themes/josh.zsh-theme | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/josh.zsh-theme b/themes/josh.zsh-theme index 9d59bd91e..6bed1a70e 100644 --- a/themes/josh.zsh-theme +++ b/themes/josh.zsh-theme @@ -5,7 +5,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" -function pat_prompt { +function josh_prompt { (( spare_width = ${COLUMNS} )) prompt=" " @@ -14,7 +14,7 @@ function pat_prompt { path_size=${#PWD} branch_size=${#branch} ruby_size=${#ruby_version} - machine_size=11 + user_machine_size=${#${(%):-%n@%m-}} if [[ ${#branch} -eq 0 ]] then (( ruby_size = ruby_size + 1 )) @@ -25,7 +25,7 @@ function pat_prompt { fi fi - (( spare_width = ${spare_width} - (${machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) )) + (( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) )) while [ ${#prompt} -lt $spare_width ]; do prompt=" $prompt" @@ -39,5 +39,5 @@ function pat_prompt { setopt prompt_subst PROMPT=' -%n@%m $(pat_prompt) +%n@%m $(josh_prompt) %(?,%{%F{green}%},%{%F{red}%})⚡%{$reset_color%} ' From 95ccb4db1a33c3cdcf7afd134567b8930fe8b6f5 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Mon, 9 Aug 2010 15:45:40 +0200 Subject: [PATCH 064/108] update brew plugin from homebrew contributions --- plugins/brew.plugin.zsh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/plugins/brew.plugin.zsh b/plugins/brew.plugin.zsh index 91397bf3a..162eb6442 100644 --- a/plugins/brew.plugin.zsh +++ b/plugins/brew.plugin.zsh @@ -1,6 +1,6 @@ #compdef brew -# copied from _fink +# imported from the latest homebrew contributions _brew_all_formulae() { formulae=(`brew search`) @@ -12,19 +12,25 @@ _brew_installed_formulae() { local -a _1st_arguments _1st_arguments=( - 'install:install a formula' - 'remove:remove a formula' - 'search:search for a formula (/regex/ or string)' - 'list:list files in a formula or not-installed formulae' - 'link:link a formula' - 'unlink:unlink a formula' + 'cat:display formula file for a formula' + 'cleanup:uninstall unused and old versions of packages' + 'create:create a new formula' + 'deps:list dependencies and dependants of a formula' + 'doctor:audits your installation for common issues' + 'edit:edit a formula' 'home:visit the homepage of a formula or the brew project' 'info:information about a formula' - 'prune:remove dead links' - 'update:freshen up links' + 'install:install a formula' + 'link:link a formula' + 'list:list files in a formula or not-installed formulae' 'log:git commit log for a formula' - 'create:create a new formula' - 'edit:edit a formula' + 'outdated:list formulas for which a newer version is available' + 'prune:remove dead links' + 'remove:remove a formula' + 'search:search for a formula (/regex/ or string)' + 'unlink:unlink a formula' + 'update:freshen up links' + 'uses:show formulas which depend on a formula' ) local expl @@ -47,12 +53,12 @@ case "$words[1]" in _arguments \ '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ '1: :->forms' && return 0 - + if [[ "$state" == forms ]]; then _brew_installed_formulae _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae fi ;; - install|home|log|info) + install|home|log|info|uses|cat|deps) _brew_all_formulae _wanted formulae expl 'all formulae' compadd -a formulae ;; remove|edit|xo) From 75de90dc9eedc62edfbd34785f191c56fee802b0 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Sun, 8 Aug 2010 19:45:49 +0200 Subject: [PATCH 065/108] add simple mrtazz theme based on robbyrussell - simple theme - hostname and current folder on left prompt - git branch and working tree status on the right --- themes/mrtazz.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/mrtazz.zsh-theme diff --git a/themes/mrtazz.zsh-theme b/themes/mrtazz.zsh-theme new file mode 100644 index 000000000..214ba5a47 --- /dev/null +++ b/themes/mrtazz.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# ' +RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% ' + +ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}>" From 306cea0945166bd0b32290c0813bf90c7dee6369 Mon Sep 17 00:00:00 2001 From: Matt Fletcher Date: Thu, 14 Jan 2010 03:45:10 +0800 Subject: [PATCH 066/108] add fletcherm theme; a slightly modified copy of an old tonotdo theme --- themes/fletcherm.zsh-theme | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 themes/fletcherm.zsh-theme diff --git a/themes/fletcherm.zsh-theme b/themes/fletcherm.zsh-theme new file mode 100644 index 000000000..e96188544 --- /dev/null +++ b/themes/fletcherm.zsh-theme @@ -0,0 +1,12 @@ +# Copied from old version of tonotdo's theme. LSCOLORS modified. +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +RPROMPT='[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" + +export LSCOLORS="exfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' From aeabc3f616ccd407f68a621ecd676834e276c531 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 19 Aug 2010 08:04:18 -0700 Subject: [PATCH 067/108] Switching to /usr/bin/env zsh instead of /bin/zsh in the installer --- tools/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 004b252f4..6e3872bb9 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -22,7 +22,7 @@ echo "Copying your current PATH and adding it to the end of ~/.zshrc for you." echo "export PATH=$PATH" >> ~/.zshrc echo "Time to change your default shell to zsh!" -chsh -s /bin/zsh +chsh -s "/usr/bin/env zsh" echo ' __ __ ' echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' @@ -32,5 +32,5 @@ echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' echo ' /____/' echo "\n\n ....is now installed." -/bin/zsh +/usr/bin/env zsh source ~/.zshrc From 7b6be5611763f25eca043f9ed0d46066a3454205 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Fri, 20 Aug 2010 18:55:30 +0200 Subject: [PATCH 068/108] fix problems with brew completion - update plugin architecture - completion function in $ZSH/functions/brew - plugins/brew.plugin.zsh only activates --- functions/brew/_brew | 69 +++++++++++++++++++++++++++++++++++++++ plugins/brew.plugin.zsh | 71 +++-------------------------------------- 2 files changed, 73 insertions(+), 67 deletions(-) create mode 100644 functions/brew/_brew diff --git a/functions/brew/_brew b/functions/brew/_brew new file mode 100644 index 000000000..4e590ac63 --- /dev/null +++ b/functions/brew/_brew @@ -0,0 +1,69 @@ +#compdef brew +#autoload + +# imported from the latest homebrew contributions + +_brew_all_formulae() { + formulae=(`brew search`) +} + +_brew_installed_formulae() { + installed_formulae=(`brew list`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cat:display formula file for a formula' + 'cleanup:uninstall unused and old versions of packages' + 'create:create a new formula' + 'deps:list dependencies and dependants of a formula' + 'doctor:audits your installation for common issues' + 'edit:edit a formula' + 'home:visit the homepage of a formula or the brew project' + 'info:information about a formula' + 'install:install a formula' + 'link:link a formula' + 'list:list files in a formula or not-installed formulae' + 'log:git commit log for a formula' + 'outdated:list formulas for which a newer version is available' + 'prune:remove dead links' + 'remove:remove a formula' + 'search:search for a formula (/regex/ or string)' + 'unlink:unlink a formula' + 'update:freshen up links' + 'uses:show formulas which depend on a formula' +) + +local expl +local -a formula installed_formulae + +_arguments \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(--version)--version[version information]' \ + '(--prefix)--prefix[where brew lives on this system]' \ + '(--cache)--cache[brew cache]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "brew subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + _arguments \ + '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ + '1: :->forms' && return 0 + + if [[ "$state" == forms ]]; then + _brew_installed_formulae + _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae + fi ;; + install|home|log|info|uses|cat|deps) + _brew_all_formulae + _wanted formulae expl 'all formulae' compadd -a formulae ;; + remove|edit|xo) + _brew_installed_formulae + _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; +esac + diff --git a/plugins/brew.plugin.zsh b/plugins/brew.plugin.zsh index 162eb6442..a30540966 100644 --- a/plugins/brew.plugin.zsh +++ b/plugins/brew.plugin.zsh @@ -1,67 +1,4 @@ -#compdef brew - -# imported from the latest homebrew contributions - -_brew_all_formulae() { - formulae=(`brew search`) -} - -_brew_installed_formulae() { - installed_formulae=(`brew list`) -} - -local -a _1st_arguments -_1st_arguments=( - 'cat:display formula file for a formula' - 'cleanup:uninstall unused and old versions of packages' - 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' - 'doctor:audits your installation for common issues' - 'edit:edit a formula' - 'home:visit the homepage of a formula or the brew project' - 'info:information about a formula' - 'install:install a formula' - 'link:link a formula' - 'list:list files in a formula or not-installed formulae' - 'log:git commit log for a formula' - 'outdated:list formulas for which a newer version is available' - 'prune:remove dead links' - 'remove:remove a formula' - 'search:search for a formula (/regex/ or string)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'uses:show formulas which depend on a formula' -) - -local expl -local -a formula installed_formulae - -_arguments \ - '(-v --verbose)'{-v,--verbose}'[verbose]' \ - '(--version)--version[version information]' \ - '(--prefix)--prefix[where brew lives on this system]' \ - '(--cache)--cache[brew cache]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "brew subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - _arguments \ - '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ - '1: :->forms' && return 0 - - if [[ "$state" == forms ]]; then - _brew_installed_formulae - _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae - fi ;; - install|home|log|info|uses|cat|deps) - _brew_all_formulae - _wanted formulae expl 'all formulae' compadd -a formulae ;; - remove|edit|xo) - _brew_installed_formulae - _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; -esac +# add brew completion function to path +fpath=($ZSH/functions/brew $fpath) +autoload -U compinit +compinit -i From 99f159e0a7c63e6756f8e6e40691914da8f7a96c Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Tue, 24 Aug 2010 11:08:20 -0700 Subject: [PATCH 069/108] Removing '.' alias as it is overwriting a bash/zsh feature. Closes #63 --- lib/aliases.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 80760a1f5..d2d3aed81 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -3,7 +3,6 @@ alias pu='pushd' alias po='popd' # Basic directory operations -alias .='pwd' alias ...='cd ../..' alias -- -='cd -' From fbc22d80fe098f9ee5ca935766bc3d411c53ed92 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 30 Aug 2010 14:59:23 -0400 Subject: [PATCH 070/108] Added the truly epic kennethreitz theme. --- themes/kennethreitz.zsh-theme | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 themes/kennethreitz.zsh-theme diff --git a/themes/kennethreitz.zsh-theme b/themes/kennethreitz.zsh-theme new file mode 100644 index 000000000..109be0c22 --- /dev/null +++ b/themes/kennethreitz.zsh-theme @@ -0,0 +1,13 @@ +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg[green]%}%c \ +$(git_prompt_info)\ +%{$fg[red]%}%(!.#.»)%{$reset_color%} ' +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' +RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} ' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}" + From c96f5f78cbb95d29c712af173c5b9c630efcf710 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Wed, 1 Sep 2010 13:07:11 +0200 Subject: [PATCH 071/108] add gem completion function and plugin --- functions/gem/_gem | 64 ++++++++++++++++++++++++++++++++++++++++++ plugins/gem.plugin.zsh | 4 +++ 2 files changed, 68 insertions(+) create mode 100644 functions/gem/_gem create mode 100644 plugins/gem.plugin.zsh diff --git a/functions/gem/_gem b/functions/gem/_gem new file mode 100644 index 000000000..83cba40d1 --- /dev/null +++ b/functions/gem/_gem @@ -0,0 +1,64 @@ +#compdef gem +#autoload + +# gem zsh completion, based on homebrew completion + +_gem_installed() { + installed_gems=(`gem list --local --no-versions`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cert:Manage RubyGems certificates and signing settings' + 'check:Check installed gems' + 'cleanup:Clean up old versions of installed gems in the local repository' + 'contents:Display the contents of the installed gems' + 'dependency:Show the dependencies of an installed gem' + 'environment:Display information about the RubyGems environment' + 'fetch:Download a gem and place it in the current directory' + 'generate_index:Generates the index files for a gem server directory' + 'help:Provide help on the `gem` command' + 'install:Install a gem into the local repository' + 'list:Display gems whose name starts with STRING' + 'lock:Generate a lockdown list of gems' + 'mirror:Mirror a gem repository' + 'outdated:Display all gems that need updates' + 'owner:Manage gem owners on RubyGems.org.' + 'pristine:Restores installed gems to pristine condition from files located in the gem cache' + 'push:Push a gem up to RubyGems.org' + 'query:Query gem information in local or remote repositories' + 'rdoc:Generates RDoc for pre-installed gems' + 'search:Display all gems whose name contains STRING' + 'server:Documentation and gem repository HTTP server' + 'sources:Manage the sources and cache file RubyGems uses to search for gems' + 'specification:Display gem specification (in yaml)' + 'stale:List gems along with access times' + 'uninstall:Uninstall gems from the local repository' + 'unpack:Unpack an installed gem to the current directory' + 'update:Update the named gems (or all installed gems) in the local repository' + 'which:Find the location of a library file you can require' +) + +local expl +local -a gems installed_gems + +_arguments \ + '(-v --version)'{-v,--version}'[show version]' \ + '(-h --help)'{-h,--help}'[show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "gem subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _gem_installed + _requested installed_gems expl 'installed gems' compadd -a installed_gems + fi ;; + uninstall|update) + _gem_installed + _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;; +esac diff --git a/plugins/gem.plugin.zsh b/plugins/gem.plugin.zsh new file mode 100644 index 000000000..0b6ef3c86 --- /dev/null +++ b/plugins/gem.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/functions/gem $fpath) +autoload -U compinit +compinit -i From fe09064fcf4859b0e417c8040094f622f971012a Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Wed, 1 Sep 2010 13:21:11 +0200 Subject: [PATCH 072/108] add pip completion and plugin --- functions/pip/_pip | 46 ++++++++++++++++++++++++++++++++++++++++++ plugins/pip.plugin.zsh | 4 ++++ 2 files changed, 50 insertions(+) create mode 100644 functions/pip/_pip create mode 100644 plugins/pip.plugin.zsh diff --git a/functions/pip/_pip b/functions/pip/_pip new file mode 100644 index 000000000..b58010173 --- /dev/null +++ b/functions/pip/_pip @@ -0,0 +1,46 @@ +#compdef pip +#autoload + +# pip zsh completion, based on homebrew completion + +_pip_installed() { + installed_pkgs=(`pip freeze`) +} + +local -a _1st_arguments +_1st_arguments=( + 'bundle:Create pybundles (archives containing multiple packages)' + 'freeze:Output all currently installed packages (exact versions) to stdout' + 'help:Show available commands' + 'install:Install packages' + 'search:Search PyPI' + 'uninstall:Uninstall packages' + 'unzip:Unzip individual packages' + 'zip:Zip individual packages' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '(--version)--version[Show version number of program and exit]' \ + '(-v --verbose)'{-v,--verbose}'[Give more output]' \ + '(-q --quiet)'{-q,--quiet}'[Give less output]' \ + '(-h --help)'{-h,--help}'[Show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "pip subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _pip_installed + _requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs + fi ;; + uninstall) + _pip_installed + _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; +esac diff --git a/plugins/pip.plugin.zsh b/plugins/pip.plugin.zsh new file mode 100644 index 000000000..69e21f8d7 --- /dev/null +++ b/plugins/pip.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/functions/pip $fpath) +autoload -U compinit +compinit -i From 5215e74bf470b4baba571e879cbd1bfddc28daf3 Mon Sep 17 00:00:00 2001 From: Vivek Prahlad Date: Fri, 10 Sep 2010 10:50:42 +0530 Subject: [PATCH 073/108] Adding a plugin with aliases for macports --- plugins/macports.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/macports.plugin.zsh diff --git a/plugins/macports.plugin.zsh b/plugins/macports.plugin.zsh new file mode 100644 index 000000000..94a5f5ef2 --- /dev/null +++ b/plugins/macports.plugin.zsh @@ -0,0 +1,6 @@ +alias pc="sudo port clean --all installed" +alias pi="sudo port install $1" +alias psu="sudo port selfupdate" +alias puni="sudo port uninstall inactive" +alias puo="sudo port upgrade outdated" +alias pup="psu && puo" From f9fce9bb8d293286d7d0fb7ecde170bd0c7f37fc Mon Sep 17 00:00:00 2001 From: Vivek Prahlad Date: Fri, 10 Sep 2010 10:55:17 +0530 Subject: [PATCH 074/108] Adding comments --- plugins/macports.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/macports.plugin.zsh b/plugins/macports.plugin.zsh index 94a5f5ef2..9564829b0 100644 --- a/plugins/macports.plugin.zsh +++ b/plugins/macports.plugin.zsh @@ -1,3 +1,4 @@ +#Aliases alias pc="sudo port clean --all installed" alias pi="sudo port install $1" alias psu="sudo port selfupdate" From a0a8ba666b29cbcdbba05726e4e2d46eca708ca1 Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sat, 27 Feb 2010 16:15:47 -0700 Subject: [PATCH 075/108] Initial pass at pesistant directory stack --- lib/dirspersist.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/dirspersist.zsh diff --git a/lib/dirspersist.zsh b/lib/dirspersist.zsh new file mode 100644 index 000000000..a7c077ae0 --- /dev/null +++ b/lib/dirspersist.zsh @@ -0,0 +1,19 @@ +#!/bin/zsh +# +# Make the dirstack more persistant +# +# Run dirpersiststore in ~/.zlogout + +dirpersiststore () { + dirs -p | sed 's/ /\\ /g;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore +} + +dirpersistrestore () { + if [ -f ~/.zdirstore ]; then + source ~/.zdirstore + fi +} + +DIRSTACKSIZE=10 +setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups +dirpersistrestore \ No newline at end of file From 870551e960c6cb506fd7cc232a069432dfc72f2c Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Mon, 15 Mar 2010 20:34:26 -0600 Subject: [PATCH 076/108] Alias popd to remove deleted dirs from persistance --- lib/dirspersist.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dirspersist.zsh b/lib/dirspersist.zsh index a7c077ae0..8364a879c 100644 --- a/lib/dirspersist.zsh +++ b/lib/dirspersist.zsh @@ -16,4 +16,7 @@ dirpersistrestore () { DIRSTACKSIZE=10 setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups -dirpersistrestore \ No newline at end of file +dirpersistrestore + +# Make popd changes permanent without having to wait for logout +alias popd="popd;dirpersiststore" \ No newline at end of file From 21e2a913bff765b8dc23f12309059f7446e0ff99 Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Fri, 2 Apr 2010 15:24:41 -0600 Subject: [PATCH 077/108] Escape &'s in path name. Need to find general function for escaping all shell metacharacters. --- lib/dirspersist.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dirspersist.zsh b/lib/dirspersist.zsh index 8364a879c..973107c52 100644 --- a/lib/dirspersist.zsh +++ b/lib/dirspersist.zsh @@ -5,7 +5,8 @@ # Run dirpersiststore in ~/.zlogout dirpersiststore () { - dirs -p | sed 's/ /\\ /g;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore +# FIXME: need to escape all shell metacharacters, not just spaces! + dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore } dirpersistrestore () { @@ -19,4 +20,4 @@ setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups dirpersistrestore # Make popd changes permanent without having to wait for logout -alias popd="popd;dirpersiststore" \ No newline at end of file +alias popd="popd;dirpersiststore" From 181a2ed5379f5bf9d0420c0caaea56034eb22732 Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Thu, 22 Apr 2010 11:26:08 -0600 Subject: [PATCH 078/108] Escape some metachars that trip up .zdirstore script --- lib/dirspersist.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dirspersist.zsh b/lib/dirspersist.zsh index 973107c52..d694c55e2 100644 --- a/lib/dirspersist.zsh +++ b/lib/dirspersist.zsh @@ -5,8 +5,7 @@ # Run dirpersiststore in ~/.zlogout dirpersiststore () { -# FIXME: need to escape all shell metacharacters, not just spaces! - dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore + dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore } dirpersistrestore () { From 50fb2d037ee75ac6e558923c7a92c818a96d43c8 Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sun, 19 Sep 2010 19:39:51 -0600 Subject: [PATCH 079/108] Move dirpersist to plugin --- lib/dirspersist.zsh => plugins/dirpersist.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/dirspersist.zsh => plugins/dirpersist.plugin.zsh (100%) diff --git a/lib/dirspersist.zsh b/plugins/dirpersist.plugin.zsh similarity index 100% rename from lib/dirspersist.zsh rename to plugins/dirpersist.plugin.zsh From 1862b1c0755770cffcbcb936bdecc3bfb050931d Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sun, 19 Sep 2010 19:43:49 -0600 Subject: [PATCH 080/108] Added installation function --- plugins/dirpersist.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index d694c55e2..48ca94d7c 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -4,6 +4,17 @@ # # Run dirpersiststore in ~/.zlogout +dirpersistinstall () { + if grep -qL 'dirpersiststore' ~/.zlogout; then + else + if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then + echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout + else + echo "If you don't want this message to appear, remove dirspersist from \$plugins" + fi + fi +} + dirpersiststore () { dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore } @@ -16,6 +27,8 @@ dirpersistrestore () { DIRSTACKSIZE=10 setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups + +dirpersistinstall dirpersistrestore # Make popd changes permanent without having to wait for logout From 610f68c8e0401048f87d1f2bd48086b8c0cd0dbe Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sun, 19 Sep 2010 22:39:11 -0600 Subject: [PATCH 081/108] Added install instructions --- plugins/dirpersist.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index 48ca94d7c..4decd8b30 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -2,7 +2,8 @@ # # Make the dirstack more persistant # -# Run dirpersiststore in ~/.zlogout +# Add dirpersist to $plugins in ~/.zshrc to load +# dirpersistinstall () { if grep -qL 'dirpersiststore' ~/.zlogout; then From 8f7609b4fabd3d02e3991221cbe35bea692c22e3 Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sun, 19 Sep 2010 22:40:47 -0600 Subject: [PATCH 082/108] Change zdirstore to variable --- plugins/dirpersist.plugin.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index 4decd8b30..5b3fdfb3d 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -5,6 +5,9 @@ # Add dirpersist to $plugins in ~/.zshrc to load # +# $zdirstore is the file used to persist the stack +zdirstore=~/.zdirstore + dirpersistinstall () { if grep -qL 'dirpersiststore' ~/.zlogout; then else @@ -17,12 +20,12 @@ dirpersistinstall () { } dirpersiststore () { - dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore + dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore } dirpersistrestore () { - if [ -f ~/.zdirstore ]; then - source ~/.zdirstore + if [ -f $zdirstore ]; then + source $zdirstore fi } From 2ff567e16267274041f542b5bce18876b8815fca Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Tue, 21 Sep 2010 12:07:02 -0600 Subject: [PATCH 083/108] Removed unportable (and unnecessary) grep flags --- plugins/dirpersist.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index 5b3fdfb3d..b5e825bff 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -9,7 +9,7 @@ zdirstore=~/.zdirstore dirpersistinstall () { - if grep -qL 'dirpersiststore' ~/.zlogout; then + if grep 'dirpersiststore' ~/.zlogout > /dev/null; then else if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout @@ -19,6 +19,7 @@ dirpersistinstall () { fi } +# FIXME solaris doesn't support tail -r dirpersiststore () { dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore } From 62cea310fb97a98f6360397dfeef3a01507153fd Mon Sep 17 00:00:00 2001 From: gwjo Date: Fri, 24 Sep 2010 20:46:52 -0400 Subject: [PATCH 084/108] ssh-agent module Implement a simple module that automatically launches the ssh-agent when you login and adds your default key. Useful for anyone that does remote work and thus doesn't have access to a keychain tool. --- plugins/ssh-agent.plugin.zsh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 plugins/ssh-agent.plugin.zsh diff --git a/plugins/ssh-agent.plugin.zsh b/plugins/ssh-agent.plugin.zsh new file mode 100644 index 000000000..fa8c45ea2 --- /dev/null +++ b/plugins/ssh-agent.plugin.zsh @@ -0,0 +1,24 @@ +# Based on code from Joseph M. Reagle +# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html + +local SSH_ENV=$HOME/.ssh/environment + +function start_agent { + /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} + chmod 600 ${SSH_ENV} + . ${SSH_ENV} > /dev/null + /usr/bin/ssh-add; +} + +# Source SSH settings, if applicable + +if [ -f "${SSH_ENV}" ]; then + . ${SSH_ENV} > /dev/null + #ps ${SSH_AGENT_PID} doesn't work under cywgin + ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { + start_agent; + } +else + start_agent; +fi + From 6764e50397f35eba635e57a231ff06f1685efc5f Mon Sep 17 00:00:00 2001 From: Jake Bell Date: Sat, 25 Sep 2010 00:48:19 -0500 Subject: [PATCH 085/108] Added theunraveler theme. --- themes/theunraveler.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/theunraveler.zsh-theme diff --git a/themes/theunraveler.zsh-theme b/themes/theunraveler.zsh-theme new file mode 100644 index 000000000..4eec8e827 --- /dev/null +++ b/themes/theunraveler.zsh-theme @@ -0,0 +1,6 @@ +# Comment + +ZSH_THEME_GIT_PROMPT_PREFIX=' (git:' +ZSH_THEME_GIT_PROMPT_SUFFIX=')' + +PROMPT='%{$fg[magenta]%}[%c]$(git_prompt_info) $ %{$reset_color%}' \ No newline at end of file From e37d62a282dc74b7cd265643dcb01f80e25b3e34 Mon Sep 17 00:00:00 2001 From: Tomas Kramar Date: Sun, 26 Sep 2010 16:05:53 +0200 Subject: [PATCH 086/108] unset config_file is useless --- oh-my-zsh.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index bb45c71eb..c46aea7ac 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -21,5 +21,3 @@ then else /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh fi - -unset config_file \ No newline at end of file From 74b2c5d75ab6477ea3f72eeadb6fd81b42c1abd4 Mon Sep 17 00:00:00 2001 From: Tomas Kramar Date: Sun, 26 Sep 2010 16:03:44 +0200 Subject: [PATCH 087/108] Do not complete named-directories --- lib/completion.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index cba90179f..52cc5b53c 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -1,4 +1,4 @@ -## fixme - the load process here seems a bit bizarre +# fixme - the load process here seems a bit bizarre unsetopt menu_complete # do not autoselect the first completion entry unsetopt flowcontrol @@ -30,6 +30,11 @@ zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" +# disable named-directories autocompletion +zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories +cdpath=(.) + + # Load known hosts file for auto-completion with ssh and scp commands if [ -f ~/.ssh/known_hosts ]; then zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) From 6c3b9daaf7cd1bf387d46e865f316c6815dc14d2 Mon Sep 17 00:00:00 2001 From: Tomas Kramar Date: Sun, 26 Sep 2010 22:25:31 +0200 Subject: [PATCH 088/108] Add vi-mode plugin for vi-like editing --- plugins/vi-mode.plugin.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 plugins/vi-mode.plugin.zsh diff --git a/plugins/vi-mode.plugin.zsh b/plugins/vi-mode.plugin.zsh new file mode 100644 index 000000000..c47ab7211 --- /dev/null +++ b/plugins/vi-mode.plugin.zsh @@ -0,0 +1,22 @@ +function zle-line-init zle-keymap-select { + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select + +bindkey -v + +# if mode indicator wasn't setup by theme, define default +if [[ "$MODE_INDICATOR" == "" ]]; then + MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" +fi + +function vi_mode_prompt_info() { + echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" +} + +# define right prompt, if it wasn't defined by a theme +if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then + RPS1='$(vi_mode_prompt_info)' +fi From 3add6a2ac47186240a2d02a986ae22b6519d965f Mon Sep 17 00:00:00 2001 From: Matt Cable Date: Sun, 26 Sep 2010 21:30:57 -0600 Subject: [PATCH 089/108] Portable perl dirpersiststore because 'tail -r' doesn't work everywhere. --- plugins/dirpersist.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index b5e825bff..6a2b289a2 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -19,9 +19,8 @@ dirpersistinstall () { fi } -# FIXME solaris doesn't support tail -r dirpersiststore () { - dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore + dirs -p | perl -e 'foreach (reverse ) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore } dirpersistrestore () { From d647a9b25c43b75eea6fee29f27affe5edc4b72e Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 30 Sep 2010 20:54:45 -0700 Subject: [PATCH 090/108] Tidying up the spacing to bring in line with coding standards --- plugins/ssh-agent.plugin.zsh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/plugins/ssh-agent.plugin.zsh b/plugins/ssh-agent.plugin.zsh index fa8c45ea2..ce0d645c1 100644 --- a/plugins/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent.plugin.zsh @@ -4,21 +4,20 @@ local SSH_ENV=$HOME/.ssh/environment function start_agent { - /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} - chmod 600 ${SSH_ENV} - . ${SSH_ENV} > /dev/null - /usr/bin/ssh-add; + /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} + chmod 600 ${SSH_ENV} + . ${SSH_ENV} > /dev/null + /usr/bin/ssh-add; } # Source SSH settings, if applicable if [ -f "${SSH_ENV}" ]; then - . ${SSH_ENV} > /dev/null - #ps ${SSH_AGENT_PID} doesn't work under cywgin - ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { - start_agent; - } + . ${SSH_ENV} > /dev/null + ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { + start_agent; + } else - start_agent; + start_agent; fi From b9056303669806be8e1e90eacfc471590c39f353 Mon Sep 17 00:00:00 2001 From: Trevor Creech Date: Mon, 20 Sep 2010 17:31:17 -0700 Subject: [PATCH 091/108] Match xterm-color, the default OS X terminal --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index fcbe994be..561586cba 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -5,7 +5,7 @@ function title { print -nR $'\033k'$1$'\033'\\\ print -nR $'\033]0;'$2$'\a' - elif [[ $TERM == "xterm" || $TERM == "rxvt" ]]; then + elif [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then # Use this one instead for XTerms: print -nR $'\033]0;'$*$'\a' fi From 26d97a9355d37c55e0b044d8dafc425cc0ca7217 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 30 Sep 2010 21:34:06 -0700 Subject: [PATCH 092/108] Reorganizing plugins so that each plugin has it's own directory now so that any plugin-specific functions can be bundled within there. --- oh-my-zsh.sh | 2 +- plugins/{ => brew}/brew.plugin.zsh | 0 plugins/{ => dirpersist}/dirpersist.plugin.zsh | 0 plugins/{ => git}/git.plugin.zsh | 0 plugins/{ => lighthouse}/lighthouse.plugin.zsh | 0 plugins/{ => macports}/macports.plugin.zsh | 0 plugins/{ => mysql}/mysql-macports.plugin.zsh | 0 plugins/{ => osx}/osx.plugin.zsh | 0 plugins/{ => rails}/rails.plugin.zsh | 0 plugins/{ => ruby}/ruby.plugin.zsh | 0 plugins/{ => ssh-agent}/ssh-agent.plugin.zsh | 0 plugins/{ => textmate}/textmate.plugin.zsh | 0 plugins/{ => vi-mode}/vi-mode.plugin.zsh | 0 13 files changed, 1 insertion(+), 1 deletion(-) rename plugins/{ => brew}/brew.plugin.zsh (100%) rename plugins/{ => dirpersist}/dirpersist.plugin.zsh (100%) rename plugins/{ => git}/git.plugin.zsh (100%) rename plugins/{ => lighthouse}/lighthouse.plugin.zsh (100%) rename plugins/{ => macports}/macports.plugin.zsh (100%) rename plugins/{ => mysql}/mysql-macports.plugin.zsh (100%) rename plugins/{ => osx}/osx.plugin.zsh (100%) rename plugins/{ => rails}/rails.plugin.zsh (100%) rename plugins/{ => ruby}/ruby.plugin.zsh (100%) rename plugins/{ => ssh-agent}/ssh-agent.plugin.zsh (100%) rename plugins/{ => textmate}/textmate.plugin.zsh (100%) rename plugins/{ => vi-mode}/vi-mode.plugin.zsh (100%) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c46aea7ac..848e48eb5 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -12,7 +12,7 @@ for config_file ($ZSH/custom/*.zsh) source $config_file # Load all of the plugins that were defined in ~/.zshrc plugin=${plugin:=()} -for plugin ($plugins) source $ZSH/plugins/$plugin.plugin.zsh +for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" = "true" ] diff --git a/plugins/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh similarity index 100% rename from plugins/brew.plugin.zsh rename to plugins/brew/brew.plugin.zsh diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh similarity index 100% rename from plugins/dirpersist.plugin.zsh rename to plugins/dirpersist/dirpersist.plugin.zsh diff --git a/plugins/git.plugin.zsh b/plugins/git/git.plugin.zsh similarity index 100% rename from plugins/git.plugin.zsh rename to plugins/git/git.plugin.zsh diff --git a/plugins/lighthouse.plugin.zsh b/plugins/lighthouse/lighthouse.plugin.zsh similarity index 100% rename from plugins/lighthouse.plugin.zsh rename to plugins/lighthouse/lighthouse.plugin.zsh diff --git a/plugins/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh similarity index 100% rename from plugins/macports.plugin.zsh rename to plugins/macports/macports.plugin.zsh diff --git a/plugins/mysql-macports.plugin.zsh b/plugins/mysql/mysql-macports.plugin.zsh similarity index 100% rename from plugins/mysql-macports.plugin.zsh rename to plugins/mysql/mysql-macports.plugin.zsh diff --git a/plugins/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh similarity index 100% rename from plugins/osx.plugin.zsh rename to plugins/osx/osx.plugin.zsh diff --git a/plugins/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh similarity index 100% rename from plugins/rails.plugin.zsh rename to plugins/rails/rails.plugin.zsh diff --git a/plugins/ruby.plugin.zsh b/plugins/ruby/ruby.plugin.zsh similarity index 100% rename from plugins/ruby.plugin.zsh rename to plugins/ruby/ruby.plugin.zsh diff --git a/plugins/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh similarity index 100% rename from plugins/ssh-agent.plugin.zsh rename to plugins/ssh-agent/ssh-agent.plugin.zsh diff --git a/plugins/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh similarity index 100% rename from plugins/textmate.plugin.zsh rename to plugins/textmate/textmate.plugin.zsh diff --git a/plugins/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh similarity index 100% rename from plugins/vi-mode.plugin.zsh rename to plugins/vi-mode/vi-mode.plugin.zsh From 7936bbbd5a3895caa7153e4d03740ac12a333862 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Fri, 1 Oct 2010 10:59:48 +0200 Subject: [PATCH 093/108] adapt brew,gem,pip plugin to new structure --- {functions => plugins}/brew/_brew | 0 plugins/brew/brew.plugin.zsh | 2 +- {functions => plugins}/gem/_gem | 0 plugins/{ => gem}/gem.plugin.zsh | 2 +- {functions => plugins}/pip/_pip | 0 plugins/{ => pip}/pip.plugin.zsh | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename {functions => plugins}/brew/_brew (100%) rename {functions => plugins}/gem/_gem (100%) rename plugins/{ => gem}/gem.plugin.zsh (67%) rename {functions => plugins}/pip/_pip (100%) rename plugins/{ => pip}/pip.plugin.zsh (67%) diff --git a/functions/brew/_brew b/plugins/brew/_brew similarity index 100% rename from functions/brew/_brew rename to plugins/brew/_brew diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index a30540966..353a18942 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,4 +1,4 @@ # add brew completion function to path -fpath=($ZSH/functions/brew $fpath) +fpath=($ZSH/plugins/brew $fpath) autoload -U compinit compinit -i diff --git a/functions/gem/_gem b/plugins/gem/_gem similarity index 100% rename from functions/gem/_gem rename to plugins/gem/_gem diff --git a/plugins/gem.plugin.zsh b/plugins/gem/gem.plugin.zsh similarity index 67% rename from plugins/gem.plugin.zsh rename to plugins/gem/gem.plugin.zsh index 0b6ef3c86..65d3766f3 100644 --- a/plugins/gem.plugin.zsh +++ b/plugins/gem/gem.plugin.zsh @@ -1,4 +1,4 @@ # add brew completion function to path -fpath=($ZSH/functions/gem $fpath) +fpath=($ZSH/plugins/gem $fpath) autoload -U compinit compinit -i diff --git a/functions/pip/_pip b/plugins/pip/_pip similarity index 100% rename from functions/pip/_pip rename to plugins/pip/_pip diff --git a/plugins/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh similarity index 67% rename from plugins/pip.plugin.zsh rename to plugins/pip/pip.plugin.zsh index 69e21f8d7..bf9f23968 100644 --- a/plugins/pip.plugin.zsh +++ b/plugins/pip/pip.plugin.zsh @@ -1,4 +1,4 @@ # add brew completion function to path -fpath=($ZSH/functions/pip $fpath) +fpath=($ZSH/plugins/pip $fpath) autoload -U compinit compinit -i From a4afcfddbf8c9e8769e4e78c23a144c9b3c9aaf3 Mon Sep 17 00:00:00 2001 From: Luke Randall Date: Sun, 5 Sep 2010 16:52:38 +0200 Subject: [PATCH 094/108] Add lukerandall.zsh-theme --- themes/lukerandall.zsh-theme | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 themes/lukerandall.zsh-theme diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme new file mode 100644 index 000000000..24a0612b7 --- /dev/null +++ b/themes/lukerandall.zsh-theme @@ -0,0 +1,10 @@ +# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc +# Thanks to gallifrey, upon whose theme this is based + +local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b ' +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" From 541da0c9d1cdf88583490fa06b6e307ea09bfc94 Mon Sep 17 00:00:00 2001 From: Jake Bell Date: Fri, 1 Oct 2010 14:15:52 -0500 Subject: [PATCH 095/108] Removing capistrano aliases/functions from rails plugin (since cap is not rails-specific). --- plugins/cap/cap.plugin.zsh | 21 +++++++++++++++++++++ plugins/rails/rails.plugin.zsh | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 plugins/cap/cap.plugin.zsh diff --git a/plugins/cap/cap.plugin.zsh b/plugins/cap/cap.plugin.zsh new file mode 100644 index 000000000..a0fa21d00 --- /dev/null +++ b/plugins/cap/cap.plugin.zsh @@ -0,0 +1,21 @@ +function _cap_does_task_list_need_generating () { + if [ ! -f .cap_tasks~ ]; then return 0; + else + accurate=$(stat -f%m .cap_tasks~) + changed=$(stat -f%m config/deploy.rb) + return $(expr $accurate '>=' $changed) + fi +} + +function _cap () { + if [ -f config/deploy.rb ]; then + if _cap_does_task_list_need_generating; then + echo "\nGenerating .cap_tasks~..." > /dev/stderr + cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' +> .cap_tasks~ + fi + compadd `cat .cap_tasks~` + fi +} + +compctl -K _cap cap \ No newline at end of file diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 45bebb722..ac8119e83 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -1,4 +1,3 @@ - alias ss='thin --stats "/thin/stats" start' alias sg='ruby script/generate' alias sd='ruby script/destroy' @@ -9,28 +8,6 @@ alias sc='ruby script/console' alias sd='ruby script/server --debugger' alias devlog='tail -f log/development.log' -function _cap_does_task_list_need_generating () { - if [ ! -f .cap_tasks~ ]; then return 0; - else - accurate=$(stat -f%m .cap_tasks~) - changed=$(stat -f%m config/deploy.rb) - return $(expr $accurate '>=' $changed) - fi -} - -function _cap () { - if [ -f config/deploy.rb ]; then - if _cap_does_task_list_need_generating; then - echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' -> .cap_tasks~ - fi - compadd `cat .cap_tasks~` - fi -} - -compctl -K _cap cap - function remote_console() { /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" } From d53d0eac070b270222c042c2e187dcf3a109b39a Mon Sep 17 00:00:00 2001 From: Phillip Ridlen Date: Tue, 5 Oct 2010 17:06:08 -0500 Subject: [PATCH 096/108] Add cloud.zsh-theme --- themes/cloud.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/cloud.zsh-theme diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme new file mode 100644 index 000000000..ad5e2834b --- /dev/null +++ b/themes/cloud.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" \ No newline at end of file From 8059c0727a09257dc387aa9ba17dc99d1842aa19 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 01:27:40 +0200 Subject: [PATCH 097/108] Improving git plugin so it can display much more data. --- lib/git.zsh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 889dd98df..57a78e27f 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -11,3 +11,31 @@ parse_git_dirty () { echo "$ZSH_THEME_GIT_PROMPT_CLEAN" fi } + +# get the status of the working tree +git_prompt_status() { + INDEX=$(git status --porcelain 2> /dev/null) + STATUS="" + if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" + fi + if $(echo "$INDEX" | grep '^A ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + fi + if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + fi + if $(echo "$INDEX" | grep '^R ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" + fi + if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + fi + if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" + fi + echo $STATUS +} + From b6dde1e8cfb938e507e5e8db9eac99d28a020468 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 01:49:35 +0200 Subject: [PATCH 098/108] Adding new gozilla theme --- themes/gozilla.zsh-theme | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 themes/gozilla.zsh-theme diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme new file mode 100644 index 000000000..3112b3670 --- /dev/null +++ b/themes/gozilla.zsh-theme @@ -0,0 +1,15 @@ +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +RPROMPT='$(git_prompt_status)' + +ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" + From deb0f7478b292b48338bc4d6098b8f6b013d0b4b Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 02:16:10 +0200 Subject: [PATCH 099/108] Fixing some minor redrew issue --- themes/gozilla.zsh-theme | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index 3112b3670..97566e380 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,8 +1,12 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -RPROMPT='$(git_prompt_status)' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" + +RPROMPT='$(git_prompt_status)' + ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" @@ -10,6 +14,3 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" - From aab235f6121a93b81a425d522a0c7f2aaac946bd Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 8 Oct 2010 22:44:42 -0700 Subject: [PATCH 100/108] functions: fix title() to not match any $TERM On my linux virtual terminals, where TERM="linux", I was getting annoying output that was messing up my prompt. It turns out the title function was always matching on the elif statement for xterm/rxvt no matter what and the linux vt doesn't know what to do with the title special control sequence and thus was printing out garbage. Through experimentation I figured out that the || inside of the [[ ]] did not work: export TERM=linux $ if [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then echo $TERM; fi linux $ if [[ $TERM =~ "^xterm" ]] || [[ $TERM == "rxvt" ]]; then echo $TERM; fi Signed-off-by: Brandon Philips openSUSE running zsh 4.3.10 --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index 561586cba..e494f1f4d 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -5,7 +5,7 @@ function title { print -nR $'\033k'$1$'\033'\\\ print -nR $'\033]0;'$2$'\a' - elif [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then + elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]]; then # Use this one instead for XTerms: print -nR $'\033]0;'$*$'\a' fi From df1e305736f23d8702a4d68b0fb8fc502e8c442a Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 8 Oct 2010 22:57:43 -0700 Subject: [PATCH 101/108] themes: add philips theme Theme based on clean that is more suitable for white background terminals. Signed-off-by: Brandon Philips --- themes/philips.zsh-theme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/philips.zsh-theme diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme new file mode 100644 index 000000000..fa7c59035 --- /dev/null +++ b/themes/philips.zsh-theme @@ -0,0 +1,14 @@ +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi + +PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +RPROMPT='[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' From 249fe1471cde3b12366729e5a869dd56c26b07ce Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 14:29:24 +0100 Subject: [PATCH 102/108] adding github plugin --- plugins/github/_github | 39 ++++++++++++++++++++++++++++++++ plugins/github/github.plugin.zsh | 4 ++++ 2 files changed, 43 insertions(+) create mode 100644 plugins/github/_github create mode 100644 plugins/github/github.plugin.zsh diff --git a/plugins/github/_github b/plugins/github/_github new file mode 100644 index 000000000..5295081e5 --- /dev/null +++ b/plugins/github/_github @@ -0,0 +1,39 @@ +#compdef github +#autoload + +# github zsh completion, based on homebrew completion + +local -a _1st_arguments +_1st_arguments=( + 'browse:Open this repo in a web browser' + 'clone:Clone a repo' + 'config:Automatically set configuration info, or pass args to specify' + 'create-from-local:Create a new GitHub repository from the current local repository' + 'create:Create a new empty GitHub repository' + 'fetch:Fetch from a remote to a local branch' + 'fetch_all:Fetch all refs from a user' + 'fork:Forks a GitHub repository' + 'home:Open this repos master branch in a web browser' + 'ignore:Ignore a SHA from github network commits' + 'info:Info about this project' + 'issues:Project issues tools' + 'network:Project network tools - sub-commands : web [user], list, fetch, commits' + 'network --after:Only show commits after a certain date' + 'network --applies:Filter commits to patches that apply cleanly' + 'open:Open the given user/project in a web browser' + 'pull-request:Generate the text for a pull request' + 'pull:Pull from a remote' + 'search:Search GitHub for the given repository name' + 'track:Track another users repository' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "github subcommand" _1st_arguments + return +fi diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh new file mode 100644 index 000000000..c23504b85 --- /dev/null +++ b/plugins/github/github.plugin.zsh @@ -0,0 +1,4 @@ +# add github completion function to path +fpath=($ZSH/plugins/github $fpath) +autoload -U compinit +compinit -i From dfbed8fd9894ec4b13745e9e08233a750c2369ee Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:03:08 +0100 Subject: [PATCH 103/108] added git log incl. stats for the past 5 commits --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 655eaf728..d317d179d 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -12,7 +12,7 @@ alias gb='git branch' alias gba='git branch -a' alias gcount='git shortlog -sn' alias gcp='git cherry-pick' - +alias glg='git log --stat --max-count=5' # Git and svn mix alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' From fcd88edfb3464e46d3337c3ee72d28248e92ac79 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:18:35 +0100 Subject: [PATCH 104/108] adding comment and URL to github gem --- plugins/github/_github | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/github/_github b/plugins/github/_github index 5295081e5..72178946a 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -1,3 +1,6 @@ +# in order to make this work, you would need to have the github gem installed +# http://github.com/defunkt/github-gem + #compdef github #autoload From 210c76c35b1db7a761df45cd7f85d3b324f8e0b5 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:29:28 +0100 Subject: [PATCH 105/108] leaving out subcommands for now --- plugins/github/_github | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/github/_github b/plugins/github/_github index 72178946a..b8e1a9ada 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -21,8 +21,6 @@ _1st_arguments=( 'info:Info about this project' 'issues:Project issues tools' 'network:Project network tools - sub-commands : web [user], list, fetch, commits' - 'network --after:Only show commits after a certain date' - 'network --applies:Filter commits to patches that apply cleanly' 'open:Open the given user/project in a web browser' 'pull-request:Generate the text for a pull request' 'pull:Pull from a remote' From 061ea5c7c98ada295ae4623692e6811c0baab88d Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 18:06:00 +0200 Subject: [PATCH 106/108] changeing unicode characters that were causing issues --- themes/gozilla.zsh-theme | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index 97566e380..c6b752e9b 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,16 +1,15 @@ PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")" +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" -RPROMPT='$(git_prompt_status)' - -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" +RPROMPT='$(git_prompt_status)%{$reset_color%}' +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" From 425b0ef89fcd40b6b235347e32d8efd44709a802 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 18:38:01 +0100 Subject: [PATCH 107/108] bugfix - moved gem info --- plugins/github/_github | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/github/_github b/plugins/github/_github index b8e1a9ada..83e1713c7 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -1,9 +1,9 @@ -# in order to make this work, you would need to have the github gem installed -# http://github.com/defunkt/github-gem - #compdef github #autoload +# in order to make this work, you will need to have the github gem installed +# http://github.com/defunkt/github-gem + # github zsh completion, based on homebrew completion local -a _1st_arguments From dc12853b0c3e5af9e42f44cb9efdf57d44d20711 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 19:11:07 +0100 Subject: [PATCH 108/108] merging in changes from robby's repo --- lib/functions.zsh | 1 - lib/git.zsh | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index e494f1f4d..e3c0de43e 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -37,4 +37,3 @@ function take() { mkdir -p $1 cd $1 } - diff --git a/lib/git.zsh b/lib/git.zsh index 57a78e27f..75fdc1f9c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -38,4 +38,3 @@ git_prompt_status() { fi echo $STATUS } -