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

Re: Bug#434879: zsh: Incorrect completion after "dvips -Ppdf "



On Fri, Jul 27, 2007 at 10:49:29PM +0200, Vincent Lefevre wrote:
> I don't understand your question. If you mean grouping options in a
> single argument, this doesn't seem to be possible. But dvips behaves
> strangely:

Try changing "_arguments -s" to "arguments -s -w".  That might do the
right thing, though I'm still not clear on how dvips parses the command
line.

> I'd say that when an option doesn't take data, the trailing characters
> of the argument are simply ignored.
> 
> BTW, there are other problems with the completion code. For instance,
> 
>   dvips -j [Tab]
> 
> gives:
> 
>   dvips -j -
> 
> then completes options. "dvips -j [Tab]" should complete dvi files.

That should be an easy fix:

Index: Completion/Unix/Command/_dvi
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_dvi,v
retrieving revision 1.2
diff -u -r1.2 _dvi
--- Completion/Unix/Command/_dvi	21 Jan 2004 13:53:29 -0000	1.2
+++ Completion/Unix/Command/_dvi	27 Jul 2007 21:23:19 -0000
@@ -26,6 +26,7 @@
     '-F[append control-D]' \
     '-h[specify additional header file]:postscript header file:_files -g "*.(#i)(ps|eps)(-.)"' \
     '-i[one file per section]' \
+    '-j[download fonts partially]' \
     '-k[print crop marks]' \
     '-K[include postscript comments]' \
     '(-pp)-l[specify last page to print]:number of last page' \



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