zsh-users
 help / color / mirror / code / Atom feed
* CVS completion for 'forced commit'
@ 2008-01-11 15:58 N.J. Mann
  2008-01-11 16:53 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: N.J. Mann @ 2008-01-11 15:58 UTC (permalink / raw)
  To: zsh-users

Hi,


I have been using ZSH for just over a year now and I am really
impressed!  Well done all those involved.  Previously I have mainly used
TCSH and so getting ZSH completion to work "my" way was important to me.
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.

+===+===+===+===+===+===+===+

--- 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 15:37:52.000000000 +0000
@@ -170,9 +170,19 @@
     '(-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_rtag] )) ||
 (( $+functions[_cvs_diff] )) ||
 _cvs_diff() {
   local of ofwuc ouc oss ofwy ofwg ofwl

+===+===+===+===+===+===+===+

Is the above right?  Nearly right?


Cheers,
       Nick.
-- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CVS completion for 'forced commit'
  2008-01-11 15:58 CVS completion for 'forced commit' N.J. Mann
@ 2008-01-11 16:53 ` Bart Schaefer
  2008-01-11 17:05   ` N.J. Mann
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2008-01-11 16:53 UTC (permalink / raw)
  To: N.J. Mann, zsh-users

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.


} +===+===+===+===+===+===+===+
} 
} --- 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 15:37:52.000000000 +0000
} @@ -170,9 +170,19 @@
}      '(-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_rtag] )) ||
}  (( $+functions[_cvs_diff] )) ||
}  _cvs_diff() {
}    local of ofwuc ouc oss ofwy ofwg ofwl
} 
} +===+===+===+===+===+===+===+


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CVS completion for 'forced commit'
  2008-01-11 16:53 ` Bart Schaefer
@ 2008-01-11 17:05   ` N.J. Mann
  0 siblings, 0 replies; 3+ messages in thread
From: N.J. Mann @ 2008-01-11 17:05 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

In message <080111085355.ZM11608@torch.brasslantern.com>,
	Bart Schaefer (schaefer@brasslantern.com) 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.
-- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-11 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-11 15:58 CVS completion for 'forced commit' N.J. Mann
2008-01-11 16:53 ` Bart Schaefer
2008-01-11 17:05   ` N.J. Mann

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).