Skip to content

Commit

Permalink
some todo notes, take @chris2's titlebar improvements and poke at com…
Browse files Browse the repository at this point in the history
…pletions
  • Loading branch information
imajes committed Sep 22, 2009
1 parent 7d51137 commit 89d86d8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 21 deletions.
4 changes: 4 additions & 0 deletions README.textile
Expand Up @@ -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
*
11 changes: 7 additions & 4 deletions 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

Expand All @@ -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
Expand Down
22 changes: 21 additions & 1 deletion key-bindings.zsh
Expand Up @@ -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
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'

This comment has been minimized.

Copy link
@apjanke

apjanke Nov 18, 2015

Contributor

That sequence is "backward tab" (kcbt in terminfo), produced by shift-tab.

#
37 changes: 21 additions & 16 deletions 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
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

0 comments on commit 89d86d8

Please sign in to comment.