about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-15 09:45:33 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-15 09:45:33 +0000
commit854c9fdafa2d0c63442d98cce1b87c0ec51c8cde (patch)
tree07b4fd92a19a49614ed1ccc113f46a09d714d604 /Doc
parentdf3478da4e559af872e9ea813320bfa6876fb933 (diff)
downloadzsh-854c9fdafa2d0c63442d98cce1b87c0ec51c8cde.tar.gz
zsh-854c9fdafa2d0c63442d98cce1b87c0ec51c8cde.tar.xz
zsh-854c9fdafa2d0c63442d98cce1b87c0ec51c8cde.zip
zsh-workers/8272
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/mod_complist.yo2
-rw-r--r--Doc/Zsh/mod_computil.yo51
-rw-r--r--Doc/Zsh/mod_deltochar.yo2
-rw-r--r--Doc/Zsh/modules.yo6
4 files changed, 59 insertions, 2 deletions
diff --git a/Doc/Zsh/mod_complist.yo b/Doc/Zsh/mod_complist.yo
index 23f8bee2e..8aab13c68 100644
--- a/Doc/Zsh/mod_complist.yo
+++ b/Doc/Zsh/mod_complist.yo
@@ -1,4 +1,4 @@
-texinode(The complist Module)(The deltochar Module)(The compctl Module)(Zsh Modules)
+texinode(The complist Module)(The computil Module)(The compctl Module)(Zsh Modules)
 sect(The complist Module)
 cindex(completion, listing)
 cindex(completion, coloured listings)
diff --git a/Doc/Zsh/mod_computil.yo b/Doc/Zsh/mod_computil.yo
new file mode 100644
index 000000000..fc1959bf1
--- /dev/null
+++ b/Doc/Zsh/mod_computil.yo
@@ -0,0 +1,51 @@
+texinode(The computil Module)(The deltochar Module)(The complist Module)(Zsh Modules)
+sect(The computil Module)
+cindex(completion, utility)
+The tt(computil) module adds four builtin commands that are used by
+some of the completion functions in the shell function based
+completions system (see
+ifzman(zmanref(zshcompsys))\
+ifnzman(noderef(Completion System))
+). Except for tt(compdisplay) these builtin commands are very
+specialised and thus not very interesting when writing your own
+completion functions. In short, these builtin commands are:
+
+startitem()
+item(tt(compdisplay) var(name) var(string) var(defs) ...)(
+The var(defs) are strings should be of the form
+`var(str)tt(:)var(descr)' (the intended use is that the var(descr)
+describes the var(str)) and tt(compdisplay) will convert them to
+strings in which the colon is replaced by the var(string) given as the 
+second argument and spaces are inserted before that so that they are
+aligned over all strings. These resultings strings are then assigned
+to an array with the var(name) given as the first argument.
+)
+item(tt(compdescribe))(
+This is used by the tt(_describe) function to build the displays for
+the matches and to get the strings to add as matches with their
+options. The first call has to give the tt(-i) or tt(-I) option as the 
+first argument. In the first case, display strings without the
+descriptions will be generated, inthe second case, the string used to
+separate the matches from their descriptions has to be given as the
+second argument and the descriptions (if any) will be shown. All other 
+arguments are like the definition arguments to tt(_describe) itself.
+
+Once tt(compdescribe) has been called with either the tt(-i) or the
+tt(-I) option, it can be repeatedly called with the tt(-g) option and
+the names of five arrays as its arguments. This will step through the
+different sets of matches and store the options in the first array,
+the strings with descriptions in the second, the matches for these in
+the third, the strings without descriptions in the fourth, and the
+matches for them in the fifth array. These are then directly given to
+tt(compadd) to register the matches with the completion code.
+)
+item(tt(comparguments))(
+This is used by the tt(_arguments) function to do the argument and
+command line parsing. Like tt(compdescribe) it has an option tt(-i) to 
+do the parsing and initialize some internal state and various options
+to access the state information to decide what should be completed.
+)
+item(tt(compvalues))(
+Like tt(comparguments), but for the tt(_values) function.
+)
+enditem()
diff --git a/Doc/Zsh/mod_deltochar.yo b/Doc/Zsh/mod_deltochar.yo
index 7ee8c798e..20b66a49d 100644
--- a/Doc/Zsh/mod_deltochar.yo
+++ b/Doc/Zsh/mod_deltochar.yo
@@ -1,4 +1,4 @@
-texinode(The deltochar Module)(The example Module)(The complist Module)(Zsh Modules)
+texinode(The deltochar Module)(The example Module)(The computil Module)(Zsh Modules)
 sect(The deltochar Module)
 The tt(deltochar) module makes available two ZLE functions:
 
diff --git a/Doc/Zsh/modules.yo b/Doc/Zsh/modules.yo
index 3f443b073..b06edfda2 100644
--- a/Doc/Zsh/modules.yo
+++ b/Doc/Zsh/modules.yo
@@ -25,6 +25,10 @@ completion widgets.
 item(tt(complist))(
 Completion listing extensions.
 )
+item(tt(computil))(
+A module with utility builtins needed for the shell function based
+completion system.
+)
 item(tt(deltochar))(
 A ZLE function duplicating EMACS' tt(zap-to-char).
 )
@@ -62,6 +66,7 @@ menu(The clone Module)
 menu(The comp1 Module)
 menu(The compctl Module)
 menu(The complist Module)
+menu(The computil Module)
 menu(The deltochar Module)
 menu(The example Module)
 menu(The files Module)
@@ -78,6 +83,7 @@ includefile(Zsh/mod_clone.yo)
 includefile(Zsh/mod_comp1.yo)
 includefile(Zsh/mod_compctl.yo)
 includefile(Zsh/mod_complist.yo)
+includefile(Zsh/mod_computil.yo)
 includefile(Zsh/mod_deltochar.yo)
 includefile(Zsh/mod_example.yo)
 includefile(Zsh/mod_files.yo)