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