mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
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
This commit is contained in:
parent
c10c31af1e
commit
ae50006c8a
4 changed files with 29 additions and 28 deletions
|
|
@ -11,9 +11,9 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#setopt no_beep
|
#setopt no_beep
|
||||||
setopt auto_cd
|
unsetopt auto_cd
|
||||||
setopt multios
|
setopt multios
|
||||||
setopt cdablevarS
|
unsetopt cdablevarS
|
||||||
|
|
||||||
if [[ x$WINDOW != x ]]
|
if [[ x$WINDOW != x ]]
|
||||||
then
|
then
|
||||||
|
|
@ -35,4 +35,4 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is c
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
# Load the theme
|
# Load the theme
|
||||||
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
unsetopt menu_complete # do not autoselect the first completion entry
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||||||
unsetopt flowcontrol
|
unsetopt flowcontrol
|
||||||
setopt auto_menu # show completion menu on succesive tab press
|
setopt auto_menu # show completion menu on succesive tab press
|
||||||
setopt complete_in_word
|
unsetopt complete_in_word
|
||||||
setopt always_to_end
|
setopt always_to_end
|
||||||
|
|
||||||
WORDCHARS=''
|
WORDCHARS=''
|
||||||
|
|
@ -15,10 +15,11 @@ zmodload -i zsh/complist
|
||||||
|
|
||||||
## case-insensitive (all),partial-word and then substring completion
|
## case-insensitive (all),partial-word and then substring completion
|
||||||
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
|
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
|
unset CASE_SENSITIVE
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ setopt auto_name_dirs
|
||||||
setopt auto_pushd
|
setopt auto_pushd
|
||||||
setopt pushd_ignore_dups
|
setopt pushd_ignore_dups
|
||||||
|
|
||||||
alias ..='cd ..'
|
#alias ..='cd ..'
|
||||||
alias cd..='cd ..'
|
#alias cd..='cd ..'
|
||||||
alias cd...='cd ../..'
|
#alias cd...='cd ../..'
|
||||||
alias cd....='cd ../../..'
|
#alias cd....='cd ../../..'
|
||||||
alias cd.....='cd ../../../..'
|
#alias cd.....='cd ../../../..'
|
||||||
alias cd/='cd /'
|
#alias cd/='cd /'
|
||||||
|
|
||||||
alias 1='cd -'
|
alias 1='cd -'
|
||||||
alias 2='cd +2'
|
alias 2='cd +2'
|
||||||
|
|
@ -20,21 +20,21 @@ alias 7='cd +7'
|
||||||
alias 8='cd +8'
|
alias 8='cd +8'
|
||||||
alias 9='cd +9'
|
alias 9='cd +9'
|
||||||
|
|
||||||
cd () {
|
#cd () {
|
||||||
if [[ "x$*" == "x..." ]]; then
|
# if [[ "x$*" == "x..." ]]; then
|
||||||
cd ../..
|
# cd ../..
|
||||||
elif [[ "x$*" == "x...." ]]; then
|
# elif [[ "x$*" == "x...." ]]; then
|
||||||
cd ../../..
|
# cd ../../..
|
||||||
elif [[ "x$*" == "x....." ]]; then
|
# elif [[ "x$*" == "x....." ]]; then
|
||||||
cd ../../..
|
# cd ../../..
|
||||||
elif [[ "x$*" == "x......" ]]; then
|
# elif [[ "x$*" == "x......" ]]; then
|
||||||
cd ../../../..
|
# cd ../../../..
|
||||||
else
|
# else
|
||||||
builtin cd "$@"
|
# builtin cd "$@"
|
||||||
fi
|
# fi
|
||||||
}
|
#}
|
||||||
|
|
||||||
alias md='mkdir -p'
|
alias md='mkdir -p'
|
||||||
alias rd=rmdir
|
alias rd=rmdir
|
||||||
|
|
||||||
alias d='dirs -v'
|
alias dirs='dirs -v'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ HISTSIZE=10000
|
||||||
SAVEHIST=10000
|
SAVEHIST=10000
|
||||||
|
|
||||||
setopt hist_ignore_dups # ignore duplication command history list
|
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 hist_verify
|
||||||
setopt inc_append_history
|
setopt inc_append_history
|
||||||
|
|
@ -12,5 +12,5 @@ setopt extended_history
|
||||||
setopt hist_expire_dups_first
|
setopt hist_expire_dups_first
|
||||||
setopt hist_ignore_space
|
setopt hist_ignore_space
|
||||||
|
|
||||||
setopt SHARE_HISTORY
|
unsetopt SHARE_HISTORY
|
||||||
setopt APPEND_HISTORY
|
setopt APPEND_HISTORY
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue