summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:15:46 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:15:46 +0000
commit3b97ef45e58ab19801ab12a226d5db7089f519e8 (patch)
tree5fe3f520eabf75e0c228153a16ab33e5458871f6
parentc6f9f6e736b68a0f20d80593d6a4c5803531c98b (diff)
downloadzsh-3b97ef45e58ab19801ab12a226d5db7089f519e8.tar.gz
zsh-3b97ef45e58ab19801ab12a226d5db7089f519e8.tar.xz
zsh-3b97ef45e58ab19801ab12a226d5db7089f519e8.zip
moved from Completion/Commands/_expand_word
-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