zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: _prompt: two useless ':*:'
@ 1999-12-01 12:02 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-12-01 12:02 UTC (permalink / raw)
  To: zsh-workers


Alexandre Duret-Lutz wrote:

> ~ % prompt -<TAB>
> ~ % prompt -_arguments: bad pattern: adam1):*: [253]
> 
> parse_cadef/parse_caarg won't split the action at colons once the
> first `:*pattern:' is encountered in a description, or for description
> of normal/rest arguments (starting with `n:', `*:' or `:').
> 
> Should this be said en zshcompsys.1 ?  I guess this means we can
> write `:foo:((a\:bar b\:baz))' without needing to escape colons in
> such cases (I didn't try).

Since things may change (i.e. meaning may be given to things which are 
now not meaningful), I thought it better to not document this. In the
pure shell code version this wasn't possible, btw.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: _prompt: two useless ':*:'
@ 1999-12-01 12:15 Alexandre Duret-Lutz
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Duret-Lutz @ 1999-12-01 12:15 UTC (permalink / raw)
  To: zsh-workers


~ % prompt -<TAB>
~ % prompt -_arguments: bad pattern: adam1):*: [253]

parse_cadef/parse_caarg won't split the action at colons once the
first `:*pattern:' is encountered in a description, or for description
of normal/rest arguments (starting with `n:', `*:' or `:').

Should this be said en zshcompsys.1 ?  I guess this means we can
write `:foo:((a\:bar b\:baz))' without needing to escape colons in
such cases (I didn't try).


--- Completion/User/_prompt.old	Wed Dec  1 09:43:21 1999
+++ Completion/User/_prompt	Wed Dec  1 11:43:24 1999
@@ -2,6 +2,8 @@
 
 _arguments -s \
   '-l[list themes]:*:' \
+  '-c[show selected theme]:*:' \
   "-h[help]::prompt theme:($prompt_themes):*:" \
-  "-p[preview theme(s)]:*:prompt theme:($prompt_themes):*:" \
-  {-s'[set and save theme]','*'}":prompt themes:($prompt_themes):*:"
+  "-p[preview theme(s)]:*:prompt theme:($prompt_themes)" \
+  "-s[set and save theme]:prompt theme:($prompt_themes):*:" \
+  ":prompt theme:($prompt_themes)"

-- 
Alexandre Duret-Lutz


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: _prompt: two useless ':*:'
@ 1999-12-01 12:07 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-12-01 12:07 UTC (permalink / raw)
  To: zsh-workers


I wrote:

> Alexandre Duret-Lutz wrote:
> 
> > ~ % prompt -<TAB>
> > ~ % prompt -_arguments: bad pattern: adam1):*: [253]
> > 
> > parse_cadef/parse_caarg won't split the action at colons once the
> > first `:*pattern:' is encountered in a description, or for description
> > of normal/rest arguments (starting with `n:', `*:' or `:').
> > 
> > Should this be said en zshcompsys.1 ?  I guess this means we can
> > write `:foo:((a\:bar b\:baz))' without needing to escape colons in
> > such cases (I didn't try).
> 
> Since things may change (i.e. meaning may be given to things which are 
> now not meaningful), I thought it better to not document this. In the
> pure shell code version this wasn't possible, btw.

... I was about to add something about `until I re-read the docs' --
and then hit C-cC-c too early. Sorry.

So...

Bye
 Sven

diff -u olddoc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- olddoc/Zsh/compsys.yo	Mon Nov 29 10:10:40 1999
+++ Doc/Zsh/compsys.yo	Wed Dec  1 13:06:21 1999
@@ -1899,7 +1899,9 @@
 two colons the tt(words) special array and the tt(CURRENT) special
 parameter are modified to refer only to the words after the option
 (with two colons) or to the words covered by this description (with
-three colons) during the execution or evaluation of the var(action).
+three colons) during the execution or evaluation of the
+var(action). Note that only one such `tt(:*)'-specification is useful
+and no other argument specification may be given after it.
 
 In the simplest form the var(opt-spec) is just the option name
 beginning with a minus or a plus sign, such as `tt(-foo)'. In this

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-01 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-01 12:02 PATCH: _prompt: two useless ':*:' Sven Wischnowsky
1999-12-01 12:07 Sven Wischnowsky
1999-12-01 12:15 Alexandre Duret-Lutz

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