Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _dict_words



Matt Zimmerman says:

 By default, dict -m uses an exact match, with some fuzz for spelling
 correction.  Using a prefix match gives much more natural and useful
 completion behaviour.

Thus,

Index: Completion/Unix/Type/_dict_words
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_dict_words,v
retrieving revision 1.1
diff -u -r1.1 _dict_words
--- Completion/Unix/Type/_dict_words	2 Apr 2001 14:36:38 -0000	1.1
+++ Completion/Unix/Type/_dict_words	8 Feb 2002 08:18:03 -0000
@@ -4,7 +4,7 @@
 
 [[ -z $words[CURRENT] ]] && return 1
 
-dictresults=(${${(f)${"$(dict -m $words[CURRENT])":gs/    
+dictresults=(${${(f)${"$(dict -m -s prefix $words[CURRENT])":gs/    
   / /}}:#[0-9]*matches found})
 
 for j in ${dictresults}



Messages sorted by: Reverse Date, Date, Thread, Author