summaryrefslogtreecommitdiff
path: root/lib/completion.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-08-16 14:53:06 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-08-16 14:53:06 -0600
commitf672613e98ba6b30728517b22c0e378557d7fb81 (patch)
tree40f71cbf5809d181129f812e6466eac0b7cb2509 /lib/completion.zsh
parent1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c (diff)
parent079e7bb5e0a79171f3356d55d3f6302a82645a39 (diff)
downloadzsh-f672613e98ba6b30728517b22c0e378557d7fb81.tar.gz
zsh-f672613e98ba6b30728517b22c0e378557d7fb81.tar.bz2
zsh-f672613e98ba6b30728517b22c0e378557d7fb81.zip
Merge remote-tracking branch 'origin/master' into master
Diffstat (limited to 'lib/completion.zsh')
-rw-r--r--lib/completion.zsh11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh
index 43927a277..2b62785d5 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -60,16 +60,15 @@ zstyle '*' single-ignored show
if [[ $COMPLETION_WAITING_DOTS = true ]]; then
expand-or-complete-with-dots() {
- # toggle line-wrapping off and back on again
- [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam
- print -Pn "%{%F{red}......%f%}"
- [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam
-
+ print -Pn "%F{red}…%f"
zle expand-or-complete
zle redisplay
}
zle -N expand-or-complete-with-dots
- bindkey "^I" expand-or-complete-with-dots
+ # Set the function as the default tab completion widget
+ bindkey -M emacs "^I" expand-or-complete-with-dots
+ bindkey -M viins "^I" expand-or-complete-with-dots
+ bindkey -M vicmd "^I" expand-or-complete-with-dots
fi
# automatically load bash completion functions