Diff
1diff --git a/README.textile b/README.textile
2index 86d2652bbc42a9bf45cc99da55f556516f0d197a..d01c3310a425d4a31017c2d22006575e6176c408 100644
3--- a/README.textile
4+++ b/README.textile
5@@ -54,12 +54,6 @@ h3. Uninstalling
6
7 If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command line and it'll remove itself and revert you to bash (or your previous zsh config).
8
9-h2. Thanks
10-
11-* Rick Olson (technoweenie) might remember some of the configuration, which I took from a pastie a few years ago.
12-* Marcel (noradio) provided Rick the original zsh configuration.
13-* Nicholas (ulysses) for the "rake autocompletion code":http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh.
14-
15 h2. Help out!
16
17 I'm far from being a zsh-expert and suspect there are many ways to improve. If you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
18@@ -67,3 +61,11 @@ I'm far from being a zsh-expert and suspect there are many ways to improve. If y
19 h3. Send us your theme!
20
21 I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.
22+
23+h2. Contributors
24+
25+This project wouldn't exist without all of our awesome users and contributors.
26+
27+* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors
28+
29+Thank you so much!
30diff --git a/lib/completion.zsh b/lib/completion.zsh
31index 3c5a41e142f473bf1664e7f14fce8b0a2bc3e3d3..fdd0a8536cd4825235d0f4fddd217f0f398ea86b 100644
32--- a/lib/completion.zsh
33+++ b/lib/completion.zsh
34@@ -4,7 +4,6 @@ unsetopt menu_complete # do not autoselect the first completion entry
35 unsetopt flowcontrol
36 setopt auto_menu # show completion menu on succesive tab press
37 setopt complete_in_word
38-setopt complete_aliases
39 setopt always_to_end
40
41 WORDCHARS=''
42diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
43index b250833ed66c7d886cf68e1a26ab9ea0e1004b7e..3152751e44b23f5b223eeb796e03a4fe08aff107 100644
44--- a/lib/termsupport.zsh
45+++ b/lib/termsupport.zsh
46@@ -3,11 +3,12 @@
47 #Fully support screen, iterm, and probably most modern xterm and rxvt
48 #Limited support for Apple Terminal (Terminal can't set window or tab separately)
49 function title {
50- if [[ "$TERM" == "screen" ]]; then
51- print -Pn "\ek$1\e\\" #set screen hardstatus, usually truncated at 20 chars
52+ [ "$DISABLE_AUTO_TITLE" != "true" ] || return
53+ if [[ $TERM =~ "^screen" ]]; then
54+ print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
55 elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
56- print -Pn "\e]2;$2\a" #set window name
57- print -Pn "\e]1;$1\a" #set icon (=tab) name (will override window name on broken terminal)
58+ print -Pn "\e]2;$2:q\a" #set window name
59+ print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
60 fi
61 }
62
63@@ -16,15 +17,13 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~"
64
65 #Appears when you have the prompt
66 function precmd {
67- if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
68- title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
69- fi
70+ title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
71 }
72
73 #Appears at the beginning of (and during) of command execution
74 function preexec {
75- if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
76- local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
77- title "$CMD" "%100>...>$2%<<"
78- fi
79+ emulate -L zsh
80+ setopt extended_glob
81+ local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
82+ title "$CMD" "%100>...>$2%<<"
83 }
84diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
85index 8470c28a44e08558531791518739a6bc2a92fa2d..bc340e86b3b654518649e6c7fc62d822bd96786a 100644
86--- a/plugins/git/git.plugin.zsh
87+++ b/plugins/git/git.plugin.zsh
88@@ -6,24 +6,21 @@ compdef _git gst=git-status
89 alias gl='git pull'
90 compdef _git gl=git-pull
91 alias gup='git fetch && git rebase'
92-compdef gup=git
93+compdef _git gup=git-fetch
94 alias gp='git push'
95 compdef _git gp=git-push
96-alias gd='git diff | mate'
97-# WTF is mate??
98-compdef _git gd=git-diff
99-alias gdv='git diff -w "$@" | vim -R -'
100-compdef gdv=git
101+gdv() { git-diff -w "$@" | view - }
102+compdef _git gdv=git-diff
103 alias gc='git commit -v'
104-compdef gc=git
105+compdef _git gc=git-commit
106 alias gca='git commit -v -a'
107-compdef gca=git
108+compdef _git gca=git-commit
109 alias gco='git checkout'
110 compdef _git gco=git-checkout
111 alias gb='git branch'
112 compdef _git gb=git-branch
113 alias gba='git branch -a'
114-compdef gba=git
115+compdef _git gba=git-branch
116 alias gcount='git shortlog -sn'
117 compdef gcount=git
118 alias gcp='git cherry-pick'
119diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
120new file mode 100644
121index 0000000000000000000000000000000000000000..8d45806545fa8110221c551c5e98dc7f2a9d48ec
122--- /dev/null
123+++ b/plugins/github/github.plugin.zsh
124@@ -0,0 +1,11 @@
125+# hub alias from defunkt
126+# https://github.com/defunkt/hub
127+if [ "$commands[(I)hub]" ]; then
128+ # eval `hub alias -s zsh`
129+ function git(){hub "$@"}
130+fi
131+
132+# add github completion function to path
133+fpath=($ZSH/plugins/github $fpath)
134+autoload -U compinit
135+compinit -i
136diff --git a/plugins/npm/_npm b/plugins/npm/_npm
137new file mode 100644
138index 0000000000000000000000000000000000000000..24b536188e08a12e9422fef49c16409b478d329c
139--- /dev/null
140+++ b/plugins/npm/_npm
141@@ -0,0 +1,19 @@
142+#compdef npm
143+
144+# Node Package Manager 0.3.15 completion, letting npm do all the completion work
145+
146+_npm() {
147+ compadd -- $(_npm_complete $words)
148+}
149+
150+# We want to show all errors of any substance, but never the "npm (not )ok" one.
151+# (Also doesn't consider "ERR! no match found" worth breaking the terminal for.)
152+_npm_complete() {
153+ local ask_npm
154+ ask_npm=(npm completion --color false --loglevel error -- $@)
155+ { _call_program npm $ask_npm 2>&1 >&3 \
156+ | egrep -v '^(npm (not |)ok|ERR! no match found)$' >&2; \
157+ } 3>&1
158+}
159+
160+_npm "$@"
161diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh
162new file mode 100644
163index 0000000000000000000000000000000000000000..826f0f7b00b89019e562bf21e178d7d5dcd53a63
164--- /dev/null
165+++ b/plugins/npm/npm.plugin.zsh
166@@ -0,0 +1,4 @@
167+# add npm completion function to path
168+fpath=($ZSH/plugins/npm $fpath)
169+autoload -U compinit
170+compinit -i
171diff --git a/themes/frisk.zsh-theme b/themes/frisk.zsh-theme
172new file mode 100644
173index 0000000000000000000000000000000000000000..f181aec9017616a2f938d8e857756be06214e14c
174--- /dev/null
175+++ b/themes/frisk.zsh-theme
176@@ -0,0 +1,10 @@
177+PROMPT=$'
178+%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
179+%{$fg_bold[black]%}>%{$reset_color%} '
180+
181+PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
182+
183+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
184+ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
185+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
186+ZSH_THEME_GIT_PROMPT_CLEAN=""
187diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme
188new file mode 100644
189index 0000000000000000000000000000000000000000..6e04e1595aa4d0d0dfc96f1961bfb756252ed9f4
190--- /dev/null
191+++ b/themes/kolo.zsh-theme
192@@ -0,0 +1,21 @@
193+autoload -U colors && colors
194+
195+autoload -Uz vcs_info
196+
197+zstyle ':vcs_info:*' stagedstr '%F{green}●'
198+zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
199+zstyle ':vcs_info:*' check-for-changes true
200+zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
201+zstyle ':vcs_info:*' enable git svn
202+precmd () {
203+ if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
204+ zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]'
205+ } else {
206+ zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
207+ }
208+
209+ vcs_info
210+}
211+
212+setopt prompt_subst
213+PROMPT='%B%F{magenta}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}%% '
214diff --git a/themes/kphoen.zsh-theme b/themes/kphoen.zsh-theme
215new file mode 100644
216index 0000000000000000000000000000000000000000..0e9b5e73ca5c8fe4308107b8be447cd7d949da09
217--- /dev/null
218+++ b/themes/kphoen.zsh-theme
219@@ -0,0 +1,50 @@
220+# ------------------------------------------------------------------------------
221+# FILE: kphoen.zsh-theme
222+# DESCRIPTION: oh-my-zsh theme file.
223+# AUTHOR: Kévin Gomez (geek63@gmail.com)
224+# VERSION: 1.0.0
225+# SCREENSHOT:
226+# ------------------------------------------------------------------------------
227+
228+
229+if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
230+ PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)]
231+%# '
232+
233+ ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
234+ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
235+ ZSH_THEME_GIT_PROMPT_DIRTY=""
236+ ZSH_THEME_GIT_PROMPT_CLEAN=""
237+
238+ # display exitcode on the right when >0
239+ return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
240+
241+ RPROMPT='${return_code}$(git_prompt_status)%{$reset_color%}'
242+
243+ ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
244+ ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
245+ ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
246+ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
247+ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
248+ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
249+else
250+ PROMPT='[%n@%m:%~$(git_prompt_info)]
251+%# '
252+
253+ ZSH_THEME_GIT_PROMPT_PREFIX=" on"
254+ ZSH_THEME_GIT_PROMPT_SUFFIX=""
255+ ZSH_THEME_GIT_PROMPT_DIRTY=""
256+ ZSH_THEME_GIT_PROMPT_CLEAN=""
257+
258+ # display exitcode on the right when >0
259+ return_code="%(?..%? ↵)"
260+
261+ RPROMPT='${return_code}$(git_prompt_status)'
262+
263+ ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
264+ ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹"
265+ ZSH_THEME_GIT_PROMPT_DELETED=" ✖"
266+ ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
267+ ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
268+ ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭"
269+fi