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

Re: CVS completion for 'forced commit'



In message <080111085355.ZM11608@xxxxxxxxxxxxxxxxxxxxxx>,
	Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> On Jan 11,  3:58pm, N.J. Mann wrote:
> }
> } So far the one thing that has really rattled my chain is that completion
> } does not work for `cvs commit -f`.  I have only very briefly looked at
> } the documentation for completion - ENOTIME - so the patch I am about to
> } suggest is probably wrong. :-)  However, it does appear to work.
> 
> The _cvs_commit_arg function looks OK to me but there's a stray reference
> to "(( $+functions[_cvs_rtag] )) ||" in the diff, it looks like.

Yes, it looks like I screwed up the cut and paste. :-(

Corrected patch:

+%%%%%+%%%%%+

--- zsh/4.3.4/functions/Completion/Unix/_cvs.orig       2007-10-06 07:10:48.000000000 +0100
+++ zsh/4.3.4/functions/Completion/Unix/_cvs    2008-01-11 16:56:53.000000000 +0000
@@ -170,7 +170,16 @@
     '(-F)-m+[message]:message:_cvs_m' \
     '(-m)-F+[message file]:log message file:_files' \
     '-r+[specify revision]:tag:_cvs_revisions' \
-    '*:modified file:_cvs_files_modified'
+    '*:modified file:_cvs_commit_arg'
+}
+
+(( $+functions[_cvs_commit_arg] )) ||
+_cvs_commit_arg() {
+  if (( $+opt_args[-f] )); then
+    _cvs_files
+  else
+    _cvs_files_modified
+  fi
 }
 
 (( $+functions[_cvs_diff] )) ||

+%%%%%+%%%%%+


Cheers,
       Nick.
-- 



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