From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Completion/Cvs/
Date: 01 Sep 1999 00:03:57 +0900 [thread overview]
Message-ID: <rsqyaesdmaq.fsf@crane.jaist.ac.jp> (raw)
This update cvs completion functions.
(1) Use "--opt=" instead of "--opt=-" when an argument for the option
is required.
(2) More cvs diff description.
Some long options such as "--context" has "optional_argument". I
used "--context=-" for the argument of _arguments. But it may better
to use another form that specify "=" as removal suffix.
Also, I found a problem about _arguments.
Z(2):akr@is27e1u11% ./Src/zsh -f
is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% compconf group_matches=yes
is27e1u11% compconf message_format='%d'
is27e1u11% compconf description_format='%d'
is27e1u11% cvs login -e<TAB>
->
is27e1u11% cvs login -evi
is27e1u11% _tst () { _arguments '-e+:editor:(vi)' '*::mesg:false' }
is27e1u11% tst a -e<TAB>
->
is27e1u11% tst a -evi
Becase _tst use '*::...', "vi" should not be completed.
Index: Completion/Cvs/_cvs
===================================================================
RCS file: /projects/zsh/zsh/Completion/Cvs/_cvs,v
retrieving revision 1.1.1.2
diff -u -F^( -r1.1.1.2 _cvs
--- _cvs 1999/08/27 12:05:29 1.1.1.2
+++ _cvs 1999/08/31 14:46:33
@@ -4,7 +4,7 @@
_arguments -s \
-{a,f,H,l,n,Q,q,r,t,v,w,x} \
'--version' '--help' '--help-commands' '--help-synonyms' '--help-options' \
- '--allow-root=-:rootdir:_files -/' \
+ '--allow-root=:rootdir:_files -/' \
'-b+:bindir:_cvs_bindir' \
'-T+:temporary directory:_cvs_tempdir' \
'-d+:cvsroot:_cvs_root' \
Index: Completion/Cvs/_cvs_diff
===================================================================
RCS file: /projects/zsh/zsh/Completion/Cvs/_cvs_diff,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 _cvs_diff
--- _cvs_diff 1999/08/26 11:08:18 1.1.1.1
+++ _cvs_diff 1999/08/31 14:46:33
@@ -2,14 +2,46 @@
# "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:"
_arguments -s \
- -{a,b,c,d,e,f,h,i,l,n,p,s,t,u,w,0,1,2,3,4,5,6,7,8,9,B,H,N,R} \
- '-C:lines:' \
+ -{l,R} \
'-D+:date:_cvs_D' \
- '-F+:regex:' \
- '-I+:regex:' \
- '*-L+:label:' \
- '-U:lines:' \
- '-W:columns:' \
'-k+:keyword substitution:_cvs_k' \
'-r+:tag:_cvs_revisions' \
+ -{h,p,0,1,2,3,4,5,6,7,8,9} \
+ '--binary' \
+ '--brief' \
+ '--changed-group-format=:format:' \
+ '-c' '-C+:lines:' '--context=-:lines:' \
+ '-e' '--ed' \
+ '-t' '--expand-tabs' \
+ '-f' '--forward-ed' \
+ '--horizon-lines=:lines:' \
+ '--ifdef=:name:' \
+ '-w' '--ignore-all-space' \
+ '-B' '--ignore-blank-lines' \
+ '-i' '--ignore-case' \
+ '-I+:regex:' '--ignore-matching-lines=:regex:' \
+ '-b' '--ignore-space-change' \
+ '--initial-tab' \
+ '*-L+:label:' '*--label=:label:' \
+ '--left-column' \
+ '--line-format=:format:' \
+ '-d' '--minimal' \
+ '-N' '--new-file' \
+ '--new-group-format=:format:' \
+ '--new-line-format=:format:' \
+ '--old-group-format=:format:' \
+ '--old-line-format=:format:' \
+ '--paginate' \
+ '-n' '--rcs' \
+ '-s' '--report-identical-files' \
+ '--show-c-function' \
+ '-F+:regex:' '--show-function-line=:regex:' \
+ '-y' '--side-by-side' \
+ '-H' '--speed-large-files' \
+ '--suppress-common-lines' \
+ '-a' '--text' \
+ '--unchanged-group-format=:format:' \
+ '--unchanged-line-format=:format:' \
+ '-u' '-U+:lines:' '--unified=-:lines:' \
+ '-W:columns:' '--width=:columns:' \
'*:file:_cvs_diff_arg'
Index: Completion/Cvs/_cvs_history_x
===================================================================
RCS file: /projects/zsh/zsh/Completion/Cvs/_cvs_history_x,v
retrieving revision 1.1.1.2
diff -u -F^( -r1.1.1.2 _cvs_history_x
--- _cvs_history_x 1999/08/28 06:26:32 1.1.1.2
+++ _cvs_history_x 1999/08/31 14:46:33
@@ -1,7 +1,7 @@
#autoload
compset -P '*'
-# It should describe meaning.
+
compadd "$@" -y '(
F\ --\ release
O\ --\ checkout
--
Tanaka Akira
next reply other threads:[~1999-08-31 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-31 15:03 Tanaka Akira [this message]
1999-09-01 9:25 Sven Wischnowsky
1999-09-01 10:35 ` Tanaka Akira
1999-09-01 11:03 Sven Wischnowsky
1999-09-01 12:01 ` Tanaka Akira
1999-09-01 12:23 Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsqyaesdmaq.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).