.../../.../...../
This commit is contained in:
parent
9e4503772a
commit
d5d135a739
2 changed files with 27 additions and 0 deletions
22
zsh/expand-multiple-dots.zsh
Normal file
22
zsh/expand-multiple-dots.zsh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue