mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Replace . aliases with as-you-type expansion
Replace aliases: * `...` * `....` * `.....` * `......` with as-you-type auto-expansion.
This commit is contained in:
parent
8921902388
commit
a4112f4caa
1 changed files with 10 additions and 4 deletions
|
|
@ -3,10 +3,16 @@ setopt auto_pushd
|
||||||
setopt pushd_ignore_dups
|
setopt pushd_ignore_dups
|
||||||
setopt pushdminus
|
setopt pushdminus
|
||||||
|
|
||||||
alias -g ...='../..'
|
resolve-dot() {
|
||||||
alias -g ....='../../..'
|
if [[ $LBUFFER = *.. ]]; then
|
||||||
alias -g .....='../../../..'
|
LBUFFER+=/..
|
||||||
alias -g ......='../../../../..'
|
else
|
||||||
|
LBUFFER+=.
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
zle -N resolve-dot
|
||||||
|
bindkey . resolve-dot
|
||||||
|
bindkey -M isearch . self-insert
|
||||||
|
|
||||||
alias 1='cd -'
|
alias 1='cd -'
|
||||||
alias 2='cd -2'
|
alias 2='cd -2'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue