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
|
||||
|
||||
#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"
|
||||
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
||||
|
|
|
|||
|
|
@ -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 ''
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
alias dirs='dirs -v'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue