From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9267 invoked from network); 5 May 2000 17:53:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2000 17:53:00 -0000 Received: (qmail 8493 invoked by alias); 5 May 2000 17:52:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11218 Received: (qmail 8446 invoked from network); 5 May 2000 17:52:49 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: optional argument? References: <200004250945.LAA03283@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 06 May 2000 02:53:50 +0900 In-Reply-To: <200004250945.LAA03283@beta.informatik.hu-berlin.de> (Sven Wischnowsky's message of "Tue, 25 Apr 2000 11:45:20 +0200 (MET DST)") Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) In article <200004250945.LAA03283@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > > Because an argument for `-o' is optional, `xxx' is an argument for the > > option or first non-option argument. So, the word to be completed by > > is first non-option argument or second non-option argument. > > Hence `arg1' and `arg2' should be completed. But I think this is bit > > confused and not so useful. > > Oh, did you have to say that? I found an example. Z(4):akr@serein% Src/zsh -f serein% Src/zsh -f serein% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst serein% zstyle ':completion:*' group-name '' serein% zstyle ':completion:*:messages' format %d serein% zstyle ':completion:*:descriptions' format %d serein% diff --context ChangeLog original file CVS/ Functions/ README aczsh.m4 config.sub* ChangeLog INSTALL Src/ config.cache configure* ChangeLog.3.0 LICENCE StartupFiles/ config.guess* configure.in Completion/ META-FAQ Test/ config.h install-sh* Config/ Makefile Util/ config.h.in mkinstalldirs* Doc/ Makefile.in acconfig.h config.log stamp-h Etc/ Misc/ aclocal.m4 config.status* stamp-h.in new file CVS/ Functions/ README aczsh.m4 config.sub* ChangeLog INSTALL Src/ config.cache configure* ChangeLog.3.0 LICENCE StartupFiles/ config.guess* configure.in Completion/ META-FAQ Test/ config.h install-sh* Config/ Makefile Util/ config.h.in mkinstalldirs* Doc/ Makefile.in acconfig.h config.log stamp-h Etc/ Misc/ aclocal.m4 config.status* stamp-h.in This is caused by optional argument for --context. In this position, _diff_options should completes only new files: second file set. In general, optional argument of _arguments always causes similar problem, I think. So, I think it is bit confused and not so useful. -- Tanaka Akira