zsh-workers
 help / color / mirror / code / Atom feed
From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: completion
Date: 27 Aug 1999 17:29:26 +0900	[thread overview]
Message-ID: <rsqiu6162zd.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Sven Wischnowsky's message of "Fri, 27 Aug 1999 09:03:18 +0200 (MET DST)"

In article <199908270703.JAA16459@beta.informatik.hu-berlin.de>,
  Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:

> Or -- in case something else went wrong -- just use the version of
> `_arguments' I currently have...

Hm. It has small problems about caching with short options.

Also, I modified cvs completion functions.

Index: Completion/Base/_arguments
===================================================================
RCS file: /projects/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.1.1.15
diff -u -F^( -r1.1.1.15 _arguments
--- _arguments	1999/08/27 07:09:33	1.1.1.15
+++ _arguments	1999/08/27 08:21:07
@@ -123,7 +123,7 @@
   done
 
   if [[ -n "$_args_cache_single" ]]; then
-    _args_cache_soptseq="${(@j::)${(@M)${(@k)opts[(R)]}:#[-+]?}#[-+]}"
+    _args_cache_soptseq="${(@j::)${(@M)${(@k)_args_cache_opts[(R)]}:#[-+]?}#[-+]}"
     if [[ -n "$_args_cache_soptseq" ]]; then
       _args_cache_soptseq="[$_args_cache_soptseq]#"
       _args_cache_soptseq1="$_args_cache_soptseq#"
@@ -131,7 +131,7 @@
       _args_cache_soptseq=''
       _args_cache_soptseq1=''
     fi
-    _args_cache_sopts="${(@j::)${(@M)${(@k)opts}:#[-+]?}#[-+]}${(@j::)${(@M)${(@k)dopts}:#[-+]?}#[-+]}${(@j::)${(@M)${(@k)odopts}:#[-+]?}#[-+]}"
+    _args_cache_sopts="${(@j::)${(@M)${(@k)_args_cache_opts}:#[-+]?}#[-+]}${(@j::)${(@M)${(@k)_args_cache_dopts}:#[-+]?}#[-+]}${(@j::)${(@M)${(@k)_args_cache_odopts}:#[-+]?}#[-+]}"
   else
     _args_cache_soptseq=''
     _args_cache_soptseq1=''
Index: Completion/Cvs/_cvs
===================================================================
RCS file: /projects/zsh/zsh/Completion/Cvs/_cvs,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 _cvs
--- _cvs	1999/08/26 11:08:17	1.1.1.1
+++ _cvs	1999/08/27 08:21:08
@@ -10,5 +10,5 @@
   '-d+:cvsroot:_cvs_root' \
   '-e+:editor:_cvs_editor' \
   '-s+:user variable:_cvs_user_variable' \
-  '-z:gzip level:_cvs_gzip_level' \
+  '-z+:gzip level:_cvs_gzip_level' \
   '*::cvs command:_cvs_command'
Index: Completion/Cvs/_cvs_command
===================================================================
RCS file: /projects/zsh/zsh/Completion/Cvs/_cvs_command,v
retrieving revision 1.1.1.2
diff -u -F^( -r1.1.1.2 _cvs_command
--- _cvs_command	1999/08/26 12:23:55	1.1.1.2
+++ _cvs_command	1999/08/27 08:21:08
@@ -1,40 +1,43 @@
 #autoload
 
 typeset -A cmds
-cmds=(add "ad new"            admin "adm rcs"         annotate ann
-      checkout "co get"       commit "ci com"         diff "di dif"
-      edit ""                 editors ""              export "exp ex"
-      history "hi his"        import "im imp"         init ""
-      log "lo rlog"           login "logon lgn"       logout ""
-      rdiff patch             release "re rel"        remove "rm delete"
-      status "st stat"        rtag "rt rfreeze"       tag "ta freeze"
-      unedit ""               update "up upd"         watch ""
+cmds=(add " ad new "          admin " adm rcs "       annotate " ann "
+      checkout " co get "     commit " ci com "       diff " di dif "
+      edit ""                 editors ""              export " exp ex "
+      history " hi his "      import " im imp "       init ""
+      log " lo rlog "         login " logon lgn "     logout ""
+      rdiff " patch pa "      release " re rel "      remove " rm delete "
+      status " st stat "      rtag " rt rfreeze "     tag " ta freeze "
+      unedit ""               update " up upd "       watch ""
       watchers "")
 
 if (( CURRENT == 1 )); then
   compadd ${(k)cmds} || compadd ${(kv)=cmds}
 else
-  case "$words[1]" in
-    add|ad|new) _cvs_add;;
-    admin|adm|rcs) _cvs_admin;;
-    annotate|ann) _cvs_annotate;;
-    checkout|co|get) _cvs_checkout;;
-    commit|ci|com) _cvs_commit;;
-    diff|di|dif) _cvs_diff;;
+  case "${${(k)cmds[(R)* $words[1] *]}:-$words[1]}" in
+    add) _cvs_add;;
+    admin) _cvs_admin;;
+    annotate) _cvs_annotate;;
+    checkout) _cvs_checkout;;
+    commit) _cvs_commit;;
+    diff) _cvs_diff;;
     edit) _cvs_edit;;
     editors) _cvs_editors;;
-    export|exp|ex) _cvs_export;;
-    history|hi|his) _cvs_history;;
-    import|im|imp) _cvs_import;;
+    export) _cvs_export;;
+    history) _cvs_history;;
+    import) _cvs_import;;
     init) _cvs_init;;
-    login|logon|lgn|logout) _cvs_login;;
-    rdiff|patch|pa) _cvs_rdiff;;
-    release|re|rel) _cvs_release;;
-    remove|rm|delete) _cvs_remove;;
-    status|st|stat) _cvs_status;;
-    tag|ta|freeze) _cvs_tag;;
+    log) _cvs_log;;
+    login) _cvs_login;;
+    logout) _cvs_logout;;
+    rdiff) _cvs_rdiff;;
+    release) _cvs_release;;
+    remove) _cvs_remove;;
+    status) _cvs_status;;
+    rtag) _cvs_rtag;;
+    tag) _cvs_tag;;
     unedit) _cvs_unedit;;
-    update|up|upd) _cvs_update;;
+    update) _cvs_update;;
     watch) _cvs_watch;;
     watchers) _cvs_watchers;;
     *) _message "unknown cvs command: $words[1]";;
diff -Paur Completion/Cvs/_cvs_logout Completion/Cvs+/_cvs_logout
--- Completion/Cvs/_cvs_logout	Thu Jan  1 09:00:00 1970
+++ Completion/Cvs/_cvs_logout	Fri Aug 27 17:08:54 1999
@@ -0,0 +1,3 @@
+#autoload
+
+false
-- 
Tanaka Akira


  reply	other threads:[~1999-08-27 10:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-27  7:03 Sven Wischnowsky
1999-08-27  8:29 ` Tanaka Akira [this message]
1999-08-28  6:01   ` Tanaka Akira
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  9:50 Sven Wischnowsky
1999-10-28  8:12 Sven Wischnowsky
1999-10-28  6:58 Sven Wischnowsky
1999-10-27  8:42 Sven Wischnowsky
1999-10-27 16:39 ` Bart Schaefer
1999-10-27  7:14 Sven Wischnowsky
1999-10-27 21:26 ` Tanaka Akira
1999-10-26 13:17 Sven Wischnowsky
1999-10-26 13:01 Oliver Kiddle
1999-10-26 13:35 ` Zefram
1999-10-26 11:03 Sven Wischnowsky
1999-10-26 17:17 ` Bart Schaefer
1999-10-26 17:22 ` Tanaka Akira
1999-10-26 17:32   ` Tanaka Akira
1999-08-30  9:30 Sven Wischnowsky
1999-08-26 13:52 Sven Wischnowsky
1999-08-26 12:20 Sven Wischnowsky
1999-08-26 13:17 ` Tanaka Akira
1999-08-26 17:56 ` Tanaka Akira
1999-08-25 12:57 Sven Wischnowsky
1999-08-25 12:54 Sven Wischnowsky
1999-08-25  8:24 Sven Wischnowsky
1999-08-26 10:54 ` Tanaka Akira
1999-08-24 10:43 Sven Wischnowsky
1999-08-25  1:56 ` Tanaka Akira
1999-08-24  9:12 Sven Wischnowsky
1999-08-24 10:04 ` Tanaka Akira
1999-08-23 13:46 Sven Wischnowsky
1999-08-23 16:16 ` Tanaka Akira
1999-08-24 15:56 ` Tanaka Akira
1999-08-23 12:00 Sven Wischnowsky
1999-08-23  9:32 Sven Wischnowsky
1999-08-23 10:54 ` Tanaka Akira
1999-08-20 12:59 Sven Wischnowsky
1999-08-20 23:22 ` Tanaka Akira
1999-08-21  8:39   ` Tanaka Akira
1999-08-21 17:47     ` Tanaka Akira
1999-08-20  7:42 Sven Wischnowsky
1999-08-19 13:59 Sven Wischnowsky
1999-08-19 10:44 Sven Wischnowsky
1999-08-19 14:38 ` Tanaka Akira
1999-08-24 13:46 ` Peter Stephenson

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=rsqiu6162zd.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).