... | ... |
@@ -1,11 +1,11 @@ |
1 | 1 |
## fixme - the load process here seems a bit bizarre |
2 | 2 |
|
3 |
-setopt noautomenu |
|
3 |
+unsetopt menu_complete # do not autoselect the first completion entry |
|
4 |
+unsetopt flowcontrol |
|
5 |
+setopt auto_menu # show completion menu on succesive tab press |
|
4 | 6 |
setopt complete_in_word |
5 | 7 |
setopt always_to_end |
6 | 8 |
|
7 |
-unsetopt flowcontrol |
|
8 |
- |
|
9 | 9 |
WORDCHARS='' |
10 | 10 |
|
11 | 11 |
autoload -U compinit |
... | ... |
@@ -23,14 +23,10 @@ fi |
23 | 23 |
|
24 | 24 |
zstyle ':completion:*' list-colors '' |
25 | 25 |
|
26 |
- |
|
27 |
-unsetopt MENU_COMPLETE |
|
28 |
-#setopt AUTO_MENU |
|
29 |
- |
|
30 | 26 |
# should this be in keybindings? |
31 | 27 |
bindkey -M menuselect '^o' accept-and-infer-next-history |
32 | 28 |
|
33 |
-zstyle ':completion:*:*:*:*:*' menu yes select |
|
29 |
+zstyle ':completion:*:*:*:*:*' menu select |
|
34 | 30 |
# zstyle ':completion:*:*:*:*:processes' force-list always |
35 | 31 |
|
36 | 32 |
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' |
... | ... |
@@ -5,7 +5,7 @@ function git_prompt_info() { |
5 | 5 |
} |
6 | 6 |
|
7 | 7 |
parse_git_dirty () { |
8 |
- if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then |
|
8 |
+ if [[ -n $(git status -s 2> /dev/null) ]]; then |
|
9 | 9 |
echo "$ZSH_THEME_GIT_PROMPT_DIRTY" |
10 | 10 |
else |
11 | 11 |
echo "$ZSH_THEME_GIT_PROMPT_CLEAN" |
... | ... |
@@ -1,24 +1,3 @@ |
1 |
-_rake_does_task_list_need_generating () { |
|
2 |
- if [ ! -f .rake_tasks~ ]; then return 0; |
|
3 |
- else |
|
4 |
- accurate=$(stat -f%m .rake_tasks~) |
|
5 |
- changed=$(stat -f%m Rakefile) |
|
6 |
- return $(expr $accurate '>=' $changed) |
|
7 |
- fi |
|
8 |
-} |
|
9 |
- |
|
10 |
-_rake () { |
|
11 |
- if [ -f Rakefile ]; then |
|
12 |
- if _rake_does_task_list_need_generating; then |
|
13 |
- echo "\nGenerating .rake_tasks~..." > /dev/stderr |
|
14 |
- rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~ |
|
15 |
- fi |
|
16 |
- compadd `cat .rake_tasks~` |
|
17 |
- fi |
|
18 |
-} |
|
19 |
- |
|
20 |
-compctl -K _rake rake |
|
21 |
- |
|
22 | 1 |
function _cap_does_task_list_need_generating () { |
23 | 2 |
if [ ! -f .cap_tasks~ ]; then return 0; |
24 | 3 |
else |
25 | 4 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
0 |
+#! /bin/zsh |
|
1 |
+# A script to make using 256 colors in zsh less painful. |
|
2 |
+# P.C. Shyamshankar <sykora@lucentbeing.com> |
|
3 |
+# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ |
|
4 |
+ |
|
5 |
+typeset -Ag FX FG BG |
|
6 |
+ |
|
7 |
+FX=( |
|
8 |
+ reset "%{[00m%}" |
|
9 |
+ bold "%{[01m%}" no-bold "%{[22m%}" |
|
10 |
+ italic "%{[03m%}" no-italic "%{[23m%}" |
|
11 |
+ underline "%{[04m%}" no-underline "%{[24m%}" |
|
12 |
+ blink "%{[05m%}" no-blink "%{[25m%}" |
|
13 |
+ reverse "%{[07m%}" no-reverse "%{[27m%}" |
|
14 |
+) |
|
15 |
+ |
|
16 |
+for color in {000..255}; do |
|
17 |
+ FG[$color]="%{[38;5;${color}m%}" |
|
18 |
+ BG[$color]="%{[48;5;${color}m%}" |
|
19 |
+done |
21 | 23 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,13 @@ |
0 |
+# zsh theme requires 256 color enabled terminal |
|
1 |
+# i.e TERM=xterm-256color |
|
2 |
+# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ |
|
3 |
+# based on robbyrussell's shell but louder! |
|
4 |
+ |
|
5 |
+PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f |
|
6 |
+%{$fg_bold[white]%}%# %{$reset_color%}' |
|
7 |
+RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' |
|
8 |
+ |
|
9 |
+ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}" |
|
10 |
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
|
11 |
+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" |
|
12 |
+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|" |