Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: optional argument?
- X-seq: zsh-workers 11218
- From: Tanaka Akira <akr@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: optional argument?
- Date: 06 May 2000 02:53:50 +0900
- In-reply-to: <200004250945.LAA03283@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> (Sven Wischnowsky's message of "Tue, 25 Apr 2000 11:45:20 +0200 (MET DST)")
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200004250945.LAA03283@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In article <200004250945.LAA03283@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> 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
> > <TAB> 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 <TAB>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author