.../../.../...../

This commit is contained in:
Spotlight 2019-08-10 11:50:55 -05:00
parent 9e4503772a
commit d5d135a739
Signed by: spotlight
GPG key ID: 874AA355B3209BDC
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,22 @@
function expand-multiple-dots() {
local MATCH
if [[ $LBUFFER =~ '(^| )\.\.\.+' ]]; then
LBUFFER=$LBUFFER:fs%\.\.\.%../..%
fi
}
function expand-multiple-dots-then-expand-or-complete() {
zle expand-multiple-dots
zle expand-or-complete
}
function expand-multiple-dots-then-accept-line() {
zle expand-multiple-dots
zle accept-line
}
zle -N expand-multiple-dots
zle -N expand-multiple-dots-then-expand-or-complete
zle -N expand-multiple-dots-then-accept-line
bindkey '^I' expand-multiple-dots-then-expand-or-complete
bindkey '^M' expand-multiple-dots-then-accept-line