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

Re: Bug#495135: zsh-beta: Broken "look" tab completion



On Thu, Aug 14, 2008 at 03:59:27PM -0300, Nelson A. de Oliveira wrote:
> $ look [TAB]
> 
> I get this:
> 
> $ look look: /usr/share/dict/words: No such file or directory

You should file a bug on bsdmainutils to either provide a more helpful
error or raise the wordlist relationship to a Recommends.

It isn't going to work anyway, but for the sake of aesthetics:

Index: Completion/Unix/Command/_look
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_look,v
retrieving revision 1.4
diff -u -r1.4 _look
--- Completion/Unix/Command/_look	8 Jun 2005 05:33:47 -0000	1.4
+++ Completion/Unix/Command/_look	14 Aug 2008 19:19:37 -0000
@@ -11,6 +11,6 @@
   ':dictionary file:_files' && ret=0
 
 [[ -n "$state" && ! -prefix - ]] && _wanted values expl 'word prefix' \
-    compadd - $(_call_program words $words[1] '"$PREFIX"') && return
+    compadd - $(_call_program words $words[1] '"$PREFIX"' 2>/dev/null) && return
 
 return ret



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