mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
allow an argument containing only a single colon as a separator between options to _arguments and specs (16669)
This commit is contained in:
parent
fa509f5219
commit
becf65dd7f
3 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
||||||
2002-02-18 Sven Wischnowsky <wischnow@zsh.org>
|
2002-02-18 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 16669: Doc/Zsh/compsys.yo, Src/Zle/computil.c: allow an
|
||||||
|
argument containing only a single colon as a separator between
|
||||||
|
options to _arguments and specs
|
||||||
|
|
||||||
* 16668: Src/Zle/compcore.c: fix group handling nothing should
|
* 16668: Src/Zle/compcore.c: fix group handling nothing should
|
||||||
now possibly be added to the wrong group again
|
now possibly be added to the wrong group again
|
||||||
|
|
||||||
|
|
|
@ -2996,12 +2996,15 @@ Like tt(_tags) this function supports the tt(-C) option to give a
|
||||||
different name for the argument context field.
|
different name for the argument context field.
|
||||||
)
|
)
|
||||||
findex(_arguments)
|
findex(_arguments)
|
||||||
item(tt(_arguments) [ tt(-ACS) ] [ tt(-O) var(name) ] [ tt(-M) var(matchspec) ] var(spec) ...)(
|
item(tt(_arguments) [ tt(-ACS) ] [ tt(-O) var(name) ] [ tt(-M) var(matchspec) ] [ tt(:) ] var(spec) ...)(
|
||||||
This function can be used to complete words on the line by describing the
|
This function can be used to complete words on the line by describing the
|
||||||
options and arguments which may be passed to the command for which
|
options and arguments which may be passed to the command for which
|
||||||
completion is being performed. The description is given as arguments to
|
completion is being performed. The description is given as arguments to
|
||||||
this function, with each var(spec) describing one option or normal
|
this function, with each var(spec) describing one option or normal
|
||||||
argument of the command. The forms of var(spec) understood are:
|
argument of the command. To separate these var(spec)s from the
|
||||||
|
options given to tt(_arguments) itself, they can be preceeded by an
|
||||||
|
argument containing a single colon. The forms of var(spec)
|
||||||
|
understood are:
|
||||||
|
|
||||||
startitem()
|
startitem()
|
||||||
xitem(var(n)tt(:)var(message)tt(:)var(action))
|
xitem(var(n)tt(:)var(message)tt(:)var(action))
|
||||||
|
|
|
@ -1065,6 +1065,8 @@ parse_cadef(char *nam, char **args)
|
||||||
|
|
||||||
args++;
|
args++;
|
||||||
}
|
}
|
||||||
|
if (*args && !strcmp(*args, ":"))
|
||||||
|
args++;
|
||||||
if (!*args)
|
if (!*args)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue