about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Widget/_expand_word15
1 files changed, 15 insertions, 0 deletions
diff --git a/Completion/Base/Widget/_expand_word b/Completion/Base/Widget/_expand_word
new file mode 100644
index 000000000..48ce87ede
--- /dev/null
+++ b/Completion/Base/Widget/_expand_word
@@ -0,0 +1,15 @@
+#compdef -K _expand_word complete-word \C-xe _list_expansions list-choices \C-xd
+
+# Simple completion front-end implementing expansion.
+
+setopt localoptions ${_comp_options[@]}
+
+local curcontext="$curcontext"
+
+if [[ -z "$curcontext" ]]; then
+  curcontext="expand-word:::"
+else
+  curcontext="expand-word:${curcontext#*:}"
+fi
+
+_main_complete _expand