summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-09 11:04:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-09 11:04:44 +0000
commit8c6a5af791ea0ccf44b71577b4cb1a9cec92646c (patch)
treeac410f43b25caababd99f5b4987aeb7d2d66ccac /Completion/Core
parent8a5fb55595d730a0e1fc3a15ff5f69c58e9bdb5b (diff)
downloadzsh-8c6a5af791ea0ccf44b71577b4cb1a9cec92646c.tar.gz
zsh-8c6a5af791ea0ccf44b71577b4cb1a9cec92646c.tar.xz
zsh-8c6a5af791ea0ccf44b71577b4cb1a9cec92646c.zip
give control over insertion of tab when no non-blank character before cursor; add insert-tab style (11274)
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_main_complete6
1 files changed, 6 insertions, 0 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index f079e38e2..aa061ec91 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -34,6 +34,12 @@ typeset -U _lastdescr _comp_ignore
 
 [[ -z "$curcontext" ]] && curcontext=:::
 
+if [[ "$compstate[insert]" = tab* ]]; then
+  zstyle -T ":completion:${curcontext}:" insert-tab && return 1
+
+  compstate[insert]="${compstate[insert]//tab /}"
+fi
+
 # Special completion contexts after `~' and `='.
 
 if compset -P 1 '='; then