Browse code

some todo notes, take @chris2's titlebar improvements and poke at completions

James Cox authored on 22/09/2009 at 22:27:28
Showing 4 changed files
... ...
@@ -59,3 +59,7 @@ h3. Send us your theme!
59 59
 
60 60
 I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.
61 61
 
62
+h3. Todo from imajes:
63
+
64
+* need to make the title bar support git folder
65
+* 
62 66
\ No newline at end of file
... ...
@@ -1,6 +1,8 @@
1
+## fixme - the load process here seems a bit bizarre
2
+
1 3
 setopt noautomenu
2
-setopt COMPLETE_IN_WORD
3
-setopt ALWAYS_TO_END
4
+setopt complete_in_word
5
+setopt always_to_end
4 6
 
5 7
 unsetopt flowcontrol
6 8
 
... ...
@@ -17,9 +19,10 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:
17 17
 zstyle ':completion:*' list-colors ''
18 18
 zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
19 19
 
20
-unsetopt MENU_COMPLETE
21
-setopt AUTO_MENU
20
+#unsetopt MENU_COMPLETE
21
+#setopt AUTO_MENU
22 22
 
23
+# should this be in keybindings?
23 24
 bindkey -M menuselect '^o' accept-and-infer-next-history
24 25
 
25 26
 zstyle ':completion:*:*:*:*:*' menu yes select
... ...
@@ -11,4 +11,24 @@ bindkey "^[[H" beginning-of-line
11 11
 bindkey "^[[1~" beginning-of-line
12 12
 bindkey "^[[F"  end-of-line
13 13
 bindkey "^[[4~" end-of-line
14
-bindkey ' ' magic-space    # also do history expansion on space
15 14
\ No newline at end of file
15
+bindkey ' ' magic-space    # also do history expansion on space
16
+
17
+
18
+# consider emacs keybindings:
19
+
20
+#bindkey -e  ## emacs key bindings
21
+#
22
+#bindkey '^[[A' up-line-or-search
23
+#bindkey '^[[B' down-line-or-search
24
+#bindkey '^[^[[C' emacs-forward-word
25
+#bindkey '^[^[[D' emacs-backward-word
26
+#
27
+#bindkey -s '^X^Z' '%-^M'
28
+#bindkey '^[e' expand-cmd-path
29
+#bindkey '^[^I' reverse-menu-complete
30
+#bindkey '^X^N' accept-and-infer-next-history
31
+#bindkey '^W' kill-region
32
+#bindkey '^I' complete-word
33
+## Fix weird sequence that rxvt produces
34
+#bindkey -s '^[[Z' '\t'
35
+#
16 36
\ No newline at end of file
... ...
@@ -1,16 +1,21 @@
1
-# Specific to xterms, such as OS X terminal
2
-
3
-if [[ "${TERM}" == xterm* ]]; then
4
-  unset TMOUT
5
-
6
-  precmd () {
7
-    print -Pn  "\033]0;%n@%m %~\007"
8
-    #print -Pn "\033]0;%n@%m%#  %~ %l  %w :: %T\a" ## or use this
9
-  }
10
-
11
-  preexec () {
12
-    print -Pn "\033]0;%n@%m <$1> %~\007"
13
-    #print -Pn "\033]0;%n@%m%#  <$1>  %~ %l  %w :: %T\a" ## or use this
14
-  }
15
-
16
-fi
17 1
\ No newline at end of file
2
+case "$TERM" in
3
+  xterm*|rxvt*)
4
+    preexec () {
5
+      print -Pn "\e]0;%n@%m: $1\a"  # xterm
6
+    }
7
+    precmd () {
8
+      print -Pn "\e]0;%n@%m: %~\a"  # xterm
9
+    }
10
+    ;;
11
+  screen*)
12
+    preexec () {
13
+      local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
14
+      echo -ne "\ek$CMD\e\\"
15
+      print -Pn "\e]0;%n@%m: $1\a"  # xterm
16
+    }
17
+    precmd () {
18
+      echo -ne "\ekzsh\e\\"
19
+      print -Pn "\e]0;%n@%m: %~\a"  # xterm
20
+    }
21
+    ;;
22
+esac
18 23
\ No newline at end of file