Replace . aliases with as-you-type expansion

Replace aliases:

* `...`
* `....`
* `.....`
* `......`

with as-you-type auto-expansion.
This commit is contained in:
Dimitriye Danilovic 2015-06-14 15:06:43 -07:00
parent 8921902388
commit a4112f4caa

View File

@ -3,10 +3,16 @@ setopt auto_pushd
setopt pushd_ignore_dups
setopt pushdminus
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g ......='../../../../..'
resolve-dot() {
if [[ $LBUFFER = *.. ]]; then
LBUFFER+=/..
else
LBUFFER+=.
fi
}
zle -N resolve-dot
bindkey . resolve-dot
bindkey -M isearch . self-insert
alias 1='cd -'
alias 2='cd -2'