74429549856521ea71fb4a3c9e6be0741f7c86f8

Author
Dallas Reedy <code@dallasreedy.com>
Committer
Dallas Reedy <code@dallasreedy.com>
Date

Message

Merge remote branch 'robbyrussell/master'

Diff

  1diff --git a/lib/completion.zsh b/lib/completion.zsh
  2index 46b6d8f656a72cfb59007211af38181c979af73e..619dc0243b34ecd9c930b785bc49b30ee907961f 100644
  3--- a/lib/completion.zsh
  4+++ b/lib/completion.zsh
  5@@ -1,11 +1,11 @@
  6 ## fixme - the load process here seems a bit bizarre
  7 
  8-setopt noautomenu
  9+unsetopt menu_complete   # do not autoselect the first completion entry
 10+unsetopt flowcontrol
 11+setopt auto_menu         # show completion menu on succesive tab press
 12 setopt complete_in_word
 13 setopt always_to_end
 14 
 15-unsetopt flowcontrol
 16-
 17 WORDCHARS=''
 18 
 19 autoload -U compinit
 20@@ -23,14 +23,10 @@ fi
 21 
 22 zstyle ':completion:*' list-colors ''
 23 
 24-
 25-unsetopt MENU_COMPLETE
 26-#setopt AUTO_MENU
 27-
 28 # should this be in keybindings?
 29 bindkey -M menuselect '^o' accept-and-infer-next-history
 30 
 31-zstyle ':completion:*:*:*:*:*' menu yes select
 32+zstyle ':completion:*:*:*:*:*' menu select
 33 # zstyle ':completion:*:*:*:*:processes' force-list always
 34 
 35 zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
 36diff --git a/lib/git.zsh b/lib/git.zsh
 37index 629a08b0e10b370ebe923d00ea1e137374c080b8..1d1d24deb6dbb9dfbdf42f7230ec77eb56834968 100644
 38--- a/lib/git.zsh
 39+++ b/lib/git.zsh
 40@@ -5,7 +5,7 @@ function git_prompt_info() {
 41 }
 42 
 43 parse_git_dirty () {
 44-  if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
 45+  if [[ -n $(git status -s 2> /dev/null) ]]; then
 46     echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
 47   else
 48     echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
 49diff --git a/lib/rake_completion.zsh b/lib/rake_completion.zsh
 50index c425a625e1d219740e2b63bacf42e0e10fc1b46a..8336182d5d8692f609b04d0c9c9c385fc6de5367 100644
 51--- a/lib/rake_completion.zsh
 52+++ b/lib/rake_completion.zsh
 53@@ -1,24 +1,3 @@
 54-_rake_does_task_list_need_generating () {
 55-  if [ ! -f .rake_tasks~ ]; then return 0;
 56-  else
 57-    accurate=$(stat -f%m .rake_tasks~)
 58-    changed=$(stat -f%m Rakefile)
 59-    return $(expr $accurate '>=' $changed)
 60-  fi
 61-}
 62-
 63-_rake () {
 64-  if [ -f Rakefile ]; then
 65-    if _rake_does_task_list_need_generating; then
 66-      echo "\nGenerating .rake_tasks~..." > /dev/stderr
 67-      rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~
 68-    fi
 69-    compadd `cat .rake_tasks~`
 70-  fi
 71-}
 72-
 73-compctl -K _rake rake
 74-
 75 function _cap_does_task_list_need_generating () {
 76   if [ ! -f .cap_tasks~ ]; then return 0;
 77   else
 78diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh
 79new file mode 100644
 80index 0000000000000000000000000000000000000000..4006a7fe105dd0b7fddadf8b265186b57f596cc6
 81--- /dev/null
 82+++ b/lib/spectrum.zsh
 83@@ -0,0 +1,20 @@
 84+#! /bin/zsh
 85+# A script to make using 256 colors in zsh less painful.
 86+# P.C. Shyamshankar <sykora@lucentbeing.com>
 87+# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
 88+
 89+typeset -Ag FX FG BG
 90+
 91+FX=(
 92+    reset     "%{%}"
 93+    bold      "%{%}" no-bold      "%{%}"
 94+    italic    "%{%}" no-italic    "%{%}"
 95+    underline "%{%}" no-underline "%{%}"
 96+    blink     "%{%}" no-blink     "%{%}"
 97+    reverse   "%{%}" no-reverse   "%{%}"
 98+)
 99+
100+for color in {000..255}; do
101+    FG[$color]="%{[38;5;${color}m%}"
102+    BG[$color]="%{[48;5;${color}m%}"
103+done
104diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
105index fa2738e18e2e430dea5aee7d1ee67c6ea8fd8b69..a41f3d89e0d9d1846ea1d12d15658b6de52dd007 100644
106--- a/oh-my-zsh.sh
107+++ b/oh-my-zsh.sh
108@@ -17,3 +17,5 @@ then
109 else
110   /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
111 fi
112+
113+unset config_file
114diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme
115new file mode 100644
116index 0000000000000000000000000000000000000000..db0fc4277419a3b72eb11e744a3910a4cfdb7668
117--- /dev/null
118+++ b/themes/sporty_256.zsh-theme
119@@ -0,0 +1,13 @@
120+# zsh theme requires 256 color enabled terminal
121+# i.e TERM=xterm-256color
122+# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
123+# based on robbyrussell's shell but louder!
124+
125+PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
126+%{$fg_bold[white]%}%# %{$reset_color%}'
127+RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}'
128+
129+ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}"
130+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
131+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}"
132+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|"