Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: "User Contributions" manual, & misc.
- X-seq: zsh-workers 12744
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: "User Contributions" manual, & misc.
- Date: Tue, 5 Sep 2000 10:34:03 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Mon, 4 Sep 2000 20:56:36 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> As threatened in 12467, this adds an entirely new chapter of the manual
> and uses it to document a variety of things that deserve mention but that
> don't really fit anywhere else. I've also moved incremental-complete-word
> and predict-on documentation to this chapter, and taken the opportunity to
> change the zstyle context used by predict-on for most of its styles.
Great, thanks.
> Sven, if you'd care to make similar changes to incremental-complete-word
> and update the corresponding sections of this doc, I'm sure your actions
> would be met with the usual unanimous approbation.
Sure.
Misc. remarks:
- The indexes for the styles say `completion style' even for those
styles looked up with a non-:completion context. Sounds wrong,
doesn't it? If only I knew what to write instead...
- I've added a reference to the colors function in the complist docs.
- The place where the zsh/zpty module is mentioned (in info, at the
nslookup function) is messed up (by the automatic module-docs-stuff).
Bye
Sven
Index: Doc/Zsh/contrib.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/contrib.yo,v
retrieving revision 1.1
diff -u -r1.1 contrib.yo
--- Doc/Zsh/contrib.yo 2000/09/04 21:13:09 1.1
+++ Doc/Zsh/contrib.yo 2000/09/05 08:33:32
@@ -96,7 +96,7 @@
relative to the directory that contains the wordcode file.
In the first form, each var(name) is the name of a wordcode file or a
-directori containing wordcode files that should be checked. If no
+directory containing wordcode files that should be checked. If no
arguments are given, the directories and wordcode files in $fpath are
used.
@@ -432,7 +432,9 @@
This style is used by the tt(incremental-complete-word) widget. Its value
should be a pattern, and all keys matching this pattern will cause the
widget to stop incremental completion without the key having any further
-effect.
+effect. Like all styles used directly by
+tt(incremental-complete-word), this style is looked up using the
+context `tt(:incremental)'.
)
kindex(completer, completion style)
item(tt(completer))(
@@ -519,11 +521,14 @@
is any, and if it is different from the word on the line.
)
enditem()
+
+Like `tt(break-keys)', this uses the `tt(:incremental)' context.
)
kindex(stop-keys, completion style)
item(tt(stop-keys))(
This style is used by the tt(incremental-complete-word) widget. Its value
-is treated similarly to the one for the tt(break-keys) style. However, in
+is treated similarly to the one for the tt(break-keys) style (and uses
+the same context: `tt(:incremental)'). However, in
this case all keys matching the pattern given as its value will stop
incremental completion and will then execute their usual function.
)
Index: Doc/Zsh/mod_complist.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_complist.yo,v
retrieving revision 1.12
diff -u -r1.12 mod_complist.yo
--- Doc/Zsh/mod_complist.yo 2000/08/10 23:06:42 1.12
+++ Doc/Zsh/mod_complist.yo 2000/09/05 08:33:32
@@ -118,7 +118,14 @@
The default values are ISO 6429 (ANSI) compliant and can be used on
vt100 compatible terminals such as tt(xterm)s. On monochrome terminals
-the default values will have no visible effect.
+the default values will have no visible effect. The tt(colors)
+function from the contribution can be used to get associative arrays
+containing the codes for ANSI terminals (see
+ifzman(the section `Other Functions' in zmanref(zshcontrib))\
+ifnzman(noderef(Other Functions))\
+). For example, after loading tt(colors), one could use
+`tt($colors[red])' to get the code for foreground color red and
+`tt($colors[bg-green])' for the code for background color green.
If the completion system based around shell functions is used, these
parameters should not be set directly because the system controls them
Index: Functions/Zle/incremental-complete-word
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zle/incremental-complete-word,v
retrieving revision 1.5
diff -u -r1.5 incremental-complete-word
--- Functions/Zle/incremental-complete-word 2000/05/31 09:56:12 1.5
+++ Functions/Zle/incremental-complete-word 2000/09/05 08:33:32
@@ -23,12 +23,12 @@
[[ -z "$curcontext" ]] && curcontext=:::
curcontext="incremental:${curcontext#*:}"
- zstyle -s ":completion:${curcontext}" prompt pmpt ||
+ zstyle -s ":incremental" prompt pmpt ||
pmpt='incremental (%c): %u%s %l'
- zstyle -s ":completion:${curcontext}" stop-keys stop
- zstyle -s ":completion:${curcontext}" break-keys brk
+ zstyle -s ":incremental" stop-keys stop
+ zstyle -s ":incremental" break-keys brk
- if zstyle -t ":completion:${curcontext}" list; then
+ if zstyle -t ":incremental" list; then
wid=list-choices
post=( icw-list-helper )
else
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author