diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/aliases.zsh | 6 | ||||
-rw-r--r-- | lib/completion.zsh | 16 | ||||
-rw-r--r-- | lib/functions.zsh | 1 | ||||
-rw-r--r-- | lib/history.zsh | 15 | ||||
-rw-r--r-- | lib/key-bindings.zsh | 29 | ||||
-rw-r--r-- | lib/prompt.zsh | 17 |
6 files changed, 58 insertions, 26 deletions
diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 253c2ac64..cd17781a6 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -10,6 +10,7 @@ alias .='pwd' alias ...='cd ../..' alias _='sudo' +alias ss='sudo su -' #alias g='grep -in' @@ -26,7 +27,10 @@ alias gba='git branch -a' alias history='fc -l 1' alias ls='ls -F' -alias ll='ls -al' +alias ll='ls -alr' +alias l='ls' +alias ll='ls -l' +alias sl=ls # often screw this up alias sgem='sudo gem' diff --git a/lib/completion.zsh b/lib/completion.zsh index dff71cfd3..795903d0d 100644 --- a/lib/completion.zsh +++ b/lib/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 @@ -18,8 +20,9 @@ zstyle ':completion:*' list-colors '' zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) unsetopt MENU_COMPLETE -setopt AUTO_MENU +#setopt AUTO_MENU +# should this be in keybindings? bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu yes select @@ -28,3 +31,10 @@ zstyle ':completion:*:*:*:*:*' menu yes select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts` + + +#complete on history +# zstyle ':completion:*:history-words' stop yes +# zstyle ':completion:*:history-words' remove-all-dups yes +# zstyle ':completion:*:history-words' list false +# zstyle ':completion:*:history-words' menu yes
\ No newline at end of file diff --git a/lib/functions.zsh b/lib/functions.zsh index e3891f6fc..2fb096dd6 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -1,3 +1,4 @@ +## fixme, i duplicated this in xterms - oops function title { if [[ $TERM == "screen" ]]; then # Use these two for GNU Screen: diff --git a/lib/history.zsh b/lib/history.zsh index f7b63b7cd..527c32762 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,15 +1,12 @@ -# History stuff. -setopt HIST_VERIFY -setopt INC_APPEND_HISTORY -setopt SHARE_HISTORY -setopt EXTENDED_HISTORY -setopt HIST_IGNORE_DUPS - ## Command history configuration -# -HISTFILE=$ZSH/log/.zsh_history +HISTFILE=$HOME/.zsh_history HISTSIZE=10000 SAVEHIST=10000 + setopt hist_ignore_dups # ignore duplication command history list setopt share_history # share command history data +setopt hist_verify +setopt inc_append_history +setopt extended_history +setopt hist_expire_dups_first diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 20caad11f..87e47bab6 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -1,14 +1,41 @@ # TODO: Explain what some of this does.. autoload -U compinit compinit + +bindkey -e bindkey '\ew' kill-region bindkey -s '\el' "ls\n" bindkey -s '\e.' "..\n" bindkey '^r' history-incremental-search-backward bindkey "^[[5~" up-line-or-history bindkey "^[[6~" down-line-or-history + +# make search up and down work, so partially type and hit up/down to find relevant stuff +bindkey '^[[A' up-line-or-search +bindkey '^[[B' down-line-or-search + 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/lib/prompt.zsh b/lib/prompt.zsh index 31c33feb5..39689684f 100644 --- a/lib/prompt.zsh +++ b/lib/prompt.zsh @@ -1,19 +1,12 @@ export PAGER=less export LC_CTYPE=en_US.UTF-8 -bindkey -e +# speed stuff. -# Directory stuff. -setopt AUTO_NAME_DIRS - -# Speed stuff. - -#setopt NO_BEEP -setopt AUTO_CD -setopt MULTIOS -setopt CDABLEVARS - -bindkey -e +#setopt no_beep +setopt auto_cd +setopt multios +setopt cdablevarS if [[ x$WINDOW != x ]] then |