From ae50006c8a2ca9a795aadce2c5ee407b3de77102 Mon Sep 17 00:00:00 2001 From: Michael Komitee Date: Fri, 7 Jan 2011 09:49:30 -0500 Subject: [PATCH] Option and completion changes: * disabling autocd * disabling cdablevar * completion leaves cursor at the end of the word * completion assumes start-of-word * getting rid of cd() function * dirs => dirs -v * not sharing history between active sessions --- lib/appearance.zsh | 6 +++--- lib/completion.zsh | 7 ++++--- lib/directories.zsh | 40 ++++++++++++++++++++-------------------- lib/history.zsh | 4 ++-- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/lib/appearance.zsh b/lib/appearance.zsh index ffee52b5e..d13fe6036 100644 --- a/lib/appearance.zsh +++ b/lib/appearance.zsh @@ -11,9 +11,9 @@ then fi #setopt no_beep -setopt auto_cd +unsetopt auto_cd setopt multios -setopt cdablevarS +unsetopt cdablevarS if [[ x$WINDOW != x ]] then @@ -35,4 +35,4 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is c setopt prompt_subst # Load the theme -source "$ZSH/themes/$ZSH_THEME.zsh-theme" \ No newline at end of file +source "$ZSH/themes/$ZSH_THEME.zsh-theme" diff --git a/lib/completion.zsh b/lib/completion.zsh index 9fb943f9c..778df4652 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -3,7 +3,7 @@ unsetopt menu_complete # do not autoselect the first completion entry unsetopt flowcontrol setopt auto_menu # show completion menu on succesive tab press -setopt complete_in_word +unsetopt complete_in_word setopt always_to_end WORDCHARS='' @@ -15,10 +15,11 @@ zmodload -i zsh/complist ## case-insensitive (all),partial-word and then substring completion if [ "x$CASE_SENSITIVE" = "xtrue" ]; then - zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +# zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' unset CASE_SENSITIVE else - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +# zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' fi zstyle ':completion:*' list-colors '' diff --git a/lib/directories.zsh b/lib/directories.zsh index 56d7a2316..ff0118632 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -3,12 +3,12 @@ setopt auto_name_dirs setopt auto_pushd setopt pushd_ignore_dups -alias ..='cd ..' -alias cd..='cd ..' -alias cd...='cd ../..' -alias cd....='cd ../../..' -alias cd.....='cd ../../../..' -alias cd/='cd /' +#alias ..='cd ..' +#alias cd..='cd ..' +#alias cd...='cd ../..' +#alias cd....='cd ../../..' +#alias cd.....='cd ../../../..' +#alias cd/='cd /' alias 1='cd -' alias 2='cd +2' @@ -20,21 +20,21 @@ alias 7='cd +7' alias 8='cd +8' alias 9='cd +9' -cd () { - if [[ "x$*" == "x..." ]]; then - cd ../.. - elif [[ "x$*" == "x...." ]]; then - cd ../../.. - elif [[ "x$*" == "x....." ]]; then - cd ../../.. - elif [[ "x$*" == "x......" ]]; then - cd ../../../.. - else - builtin cd "$@" - fi -} +#cd () { +# if [[ "x$*" == "x..." ]]; then +# cd ../.. +# elif [[ "x$*" == "x...." ]]; then +# cd ../../.. +# elif [[ "x$*" == "x....." ]]; then +# cd ../../.. +# elif [[ "x$*" == "x......" ]]; then +# cd ../../../.. +# else +# builtin cd "$@" +# fi +#} alias md='mkdir -p' alias rd=rmdir -alias d='dirs -v' \ No newline at end of file +alias dirs='dirs -v' diff --git a/lib/history.zsh b/lib/history.zsh index ca6f57079..aa4b83db2 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -4,7 +4,7 @@ HISTSIZE=10000 SAVEHIST=10000 setopt hist_ignore_dups # ignore duplication command history list -setopt share_history # share command history data +unsetopt share_history # share command history data setopt hist_verify setopt inc_append_history @@ -12,5 +12,5 @@ setopt extended_history setopt hist_expire_dups_first setopt hist_ignore_space -setopt SHARE_HISTORY +unsetopt SHARE_HISTORY setopt APPEND_HISTORY