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

Re: completion function name clashes



We've also got a couple of cases of more than one function completing
for a specific command. There are two functions for yast. The patch
below is against the older one to make it complete .ycp files but I'll
move it to the opensuse directory.

Oliver

Index: Completion/Linux/Command/_yast
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Linux/Command/_yast,v
retrieving revision 1.1
diff -u -r1.1 _yast
--- Completion/Linux/Command/_yast	8 Jun 2005 12:12:42 -0000	1.1
+++ Completion/Linux/Command/_yast	27 Feb 2013 21:45:40 -0000
@@ -8,4 +8,4 @@
   '--noborder[no window manager border for main window]' \
   '--fullscreen[use full screen]' \
   '(-)'{-i,--install}'[install package]:*:package file:_files -g "*.rpm(-.)"' \
-  '1:module:( ${${(f)"$($words[1] -l 2>/dev/null)"}[2,-1]##* } )'
+  '1:module: _alternative files:file:_files\ -g\ \\\*.ycp\\\(-.\\\) modules:module:\(${${(f)"$($words[1] -l 2>/dev/null)"}[2,-1]##* }\)'
Index: Completion/Unix/Type/_pids
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_pids,v
retrieving revision 1.5
diff -u -r1.5 _pids
--- Completion/Unix/Type/_pids	12 May 2011 15:57:02 -0000	1.5
+++ Completion/Unix/Type/_pids	27 Feb 2013 21:45:40 -0000
@@ -1,4 +1,4 @@
-#compdef pflags pcred pmap pldd psig pstack pfiles pwdx pstop prun pwait ptree
+#compdef pflags pcred pmap pldd psig pstack pfiles pwdx pstop prun pwait
 
 # If given the `-m <pattern>' option, this tries to complete only pids
 # of processes whose command line match the `<pattern>'.
Index: Completion/Unix/Type/_pdf
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_pdf,v
retrieving revision 1.11
diff -u -r1.11 _pdf
--- Completion/Unix/Type/_pdf	6 Mar 2012 02:10:25 -0000	1.11
+++ Completion/Unix/Type/_pdf	27 Feb 2013 21:45:40 -0000
@@ -1,4 +1,4 @@
-#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv evince epdfview
+#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv epdfview
 
 local expl ext=''
 



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