about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-21 01:42:21 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-21 01:42:21 +0000
commitb2048275358b4a73c987b5a4e9370dd82f11d609 (patch)
tree1a370741fcaec4112936d63bc849f7235445e22d /Completion
parenta7bf68a836ed179e01d748ffc5f6b173885a88f1 (diff)
downloadzsh-b2048275358b4a73c987b5a4e9370dd82f11d609.tar.gz
zsh-b2048275358b4a73c987b5a4e9370dd82f11d609.tar.xz
zsh-b2048275358b4a73c987b5a4e9370dd82f11d609.zip
zsh-workers/7953
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Commands/_expand_word3
-rw-r--r--Completion/Core/_expand8
2 files changed, 11 insertions, 0 deletions
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word
index 570f06987..d8f5f42f8 100644
--- a/Completion/Commands/_expand_word
+++ b/Completion/Commands/_expand_word
@@ -10,12 +10,14 @@ local oeg="$compconfig[expand_glob]"
 local oem="$compconfig[expand_menu]"
 local oeo="$compconfig[expand_original]"
 local oep="$compconfig[expand_prompt]"
+local oec="$compconfig[expand_completions]"
 
 compconfig[expand_substitute]="${compconfig[expandword_substitute]}"
 compconfig[expand_glob]="${compconfig[expandword_glob]-$oeg}"
 compconfig[expand_menu]="${compconfig[expandword_menu]-$oem}"
 compconfig[expand_original]="${compconfig[expandword_original]-$oeo}"
 compconfig[expand_prompt]="${compconfig[expandword_prompt]-$oep}"
+compconfig[expand_completions]="${compconfig[expandword_completions]-$oec}"
 
 _main_complete _expand
 
@@ -24,3 +26,4 @@ compconfig[expand_glob]="$oeg"
 compconfig[expand_menu]="$oem"
 compconfig[expand_original]="$oeo"
 compconfig[expand_prompt]="$oep"
+compconfig[expand_completions]="$oec"
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 0b8083845..5018a6871 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -58,6 +58,14 @@
 
 local exp word="$PREFIX$SUFFIX" group=-V expl expl2 disp
 
+# First, see if we should insert all *completions*.
+
+if [[ -n "$compconfig[expand_completions]" &&
+      "${(e):-\$[$compconfig[expand_substitute]]}" -eq 1 ]]; then
+  compstate[insert]=all
+  return 1
+fi
+
 # Do this only for the first global matcher.
 
 [[ "$compstate[matcher]" -le 1 ]] || return 1