From 956ef612e2a797a3f0325cafb034b654b9e8922f Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 14:36:36 +0000 Subject: cleanup after function move --- Completion/Unix/Type/_dict_words | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Completion/Unix/Type/_dict_words (limited to 'Completion/Unix') diff --git a/Completion/Unix/Type/_dict_words b/Completion/Unix/Type/_dict_words new file mode 100644 index 000000000..44448e8f8 --- /dev/null +++ b/Completion/Unix/Type/_dict_words @@ -0,0 +1,17 @@ +#autoload + +local dict dictresult dictwords j expl + +[[ -z $words[CURRENT] ]] && return 1 + +dictresults=(${${(f)${"$(dict -m $words[CURRENT])":gs/ + / /}}:#[0-9]*matches found}) + +for j in ${dictresults} +do + dict=${j%%:*} + dictwords=(${(z)j#*:}) + + _wanted $dict expl "words from $dict" \ + compadd -M 'm:{a-zA-Z}={A-Za-z} r:|=*' -a "$@" - dictwords +done -- cgit 1.4.1