diff options
author | James Cox <james@imaj.es> | 2009-09-22 23:27:28 +0100 |
---|---|---|
committer | James Cox <james@imaj.es> | 2009-09-22 23:27:28 +0100 |
commit | 89d86d869c298642e809dfa7530b7ef2539cd07f (patch) | |
tree | d017304eeac5fa857f5e197b48a29c350436033f | |
parent | 7d511379c1eace3363433352a9e38831785d2e5e (diff) | |
download | zsh-89d86d869c298642e809dfa7530b7ef2539cd07f.tar.gz zsh-89d86d869c298642e809dfa7530b7ef2539cd07f.tar.bz2 zsh-89d86d869c298642e809dfa7530b7ef2539cd07f.zip |
some todo notes, take @chris2's titlebar improvements and poke at completions
-rw-r--r-- | README.textile | 4 | ||||
-rw-r--r-- | completion.zsh | 11 | ||||
-rw-r--r-- | key-bindings.zsh | 22 | ||||
-rw-r--r-- | xterms.zsh | 37 |
4 files changed, 53 insertions, 21 deletions
diff --git a/README.textile b/README.textile index bf4086916..851a5aba8 100644 --- a/README.textile +++ b/README.textile @@ -59,3 +59,7 @@ h3. Send us your theme! I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory. +h3. Todo from imajes: + +* need to make the title bar support git folder +*
\ No newline at end of file diff --git a/completion.zsh b/completion.zsh index dff71cfd3..c993620ce 100644 --- a/completion.zsh +++ b/completion.zsh @@ -1,6 +1,8 @@ +## fixme - the load process here seems a bit bizarre + setopt noautomenu -setopt COMPLETE_IN_WORD -setopt ALWAYS_TO_END +setopt complete_in_word +setopt always_to_end unsetopt flowcontrol @@ -17,9 +19,10 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l: zstyle ':completion:*' list-colors '' zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) -unsetopt MENU_COMPLETE -setopt AUTO_MENU +#unsetopt MENU_COMPLETE +#setopt AUTO_MENU +# should this be in keybindings? bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu yes select diff --git a/key-bindings.zsh b/key-bindings.zsh index 20caad11f..43082ae1f 100644 --- a/key-bindings.zsh +++ b/key-bindings.zsh @@ -11,4 +11,24 @@ bindkey "^[[H" beginning-of-line bindkey "^[[1~" beginning-of-line bindkey "^[[F" end-of-line bindkey "^[[4~" end-of-line -bindkey ' ' magic-space # also do history expansion on space
\ No newline at end of file +bindkey ' ' magic-space # also do history expansion on space + + +# consider emacs keybindings: + +#bindkey -e ## emacs key bindings +# +#bindkey '^[[A' up-line-or-search +#bindkey '^[[B' down-line-or-search +#bindkey '^[^[[C' emacs-forward-word +#bindkey '^[^[[D' emacs-backward-word +# +#bindkey -s '^X^Z' '%-^M' +#bindkey '^[e' expand-cmd-path +#bindkey '^[^I' reverse-menu-complete +#bindkey '^X^N' accept-and-infer-next-history +#bindkey '^W' kill-region +#bindkey '^I' complete-word +## Fix weird sequence that rxvt produces +#bindkey -s '^[[Z' '\t' +#
\ No newline at end of file diff --git a/xterms.zsh b/xterms.zsh index 17c6a104b..fef978748 100644 --- a/xterms.zsh +++ b/xterms.zsh @@ -1,16 +1,21 @@ -# Specific to xterms, such as OS X terminal - -if [[ "${TERM}" == xterm* ]]; then - unset TMOUT - - precmd () { - print -Pn "\033]0;%n@%m %~\007" - #print -Pn "\033]0;%n@%m%# %~ %l %w :: %T\a" ## or use this - } - - preexec () { - print -Pn "\033]0;%n@%m <$1> %~\007" - #print -Pn "\033]0;%n@%m%# <$1> %~ %l %w :: %T\a" ## or use this - } - -fi
\ No newline at end of file +case "$TERM" in + xterm*|rxvt*) + preexec () { + print -Pn "\e]0;%n@%m: $1\a" # xterm + } + precmd () { + print -Pn "\e]0;%n@%m: %~\a" # xterm + } + ;; + screen*) + preexec () { + local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} + echo -ne "\ek$CMD\e\\" + print -Pn "\e]0;%n@%m: $1\a" # xterm + } + precmd () { + echo -ne "\ekzsh\e\\" + print -Pn "\e]0;%n@%m: %~\a" # xterm + } + ;; +esac
\ No newline at end of file |