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