mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 22:32:12 +02:00
cleanup (12896)
This commit is contained in:
parent
0f2250de44
commit
62df18f0d8
9 changed files with 74 additions and 72 deletions
|
@ -1,5 +1,9 @@
|
|||
2000-10-05 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12896: Doc/Zsh/arith.yo, Doc/Zsh/builtins.yo, Doc/Zsh/compctl.yo,
|
||||
Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, Doc/Zsh/expn.yo,
|
||||
Doc/Zsh/func.yo, Doc/Zsh/mod_complist.yo: cleanup
|
||||
|
||||
* 12892: Completion/Core/_files, Completion/Core/_path_files,
|
||||
Doc/Zsh/compsys.yo, Doc/Zsh/expn.yo: complete after autoloaded
|
||||
directories (a rather ugly hack); remove old code in _files (comma
|
||||
|
|
|
@ -116,9 +116,9 @@ the tt(zmodload) builtin to provide standard floating point mathematical
|
|||
functions.
|
||||
|
||||
An expression of the form `tt(##)var(x)' where var(x) is any character
|
||||
sequence such as `tt(a)', `tt(^A)', or `tt(\M-\C-x)' gives the ascii
|
||||
sequence such as `tt(a)', `tt(^A)', or `tt(\M-\C-x)' gives the ASCII
|
||||
value of this character and an expression of the form `tt(#)var(foo)'
|
||||
gives the ascii value of the first character of the value of the
|
||||
gives the ASCII value of the first character of the value of the
|
||||
parameter var(foo). Note that this is different from the expression
|
||||
`tt($#)var(foo)', a standard parameter substitution which gives the
|
||||
length of the parameter var(foo). `tt(#\)' is accepted instead of
|
||||
|
@ -168,7 +168,7 @@ retain that type either until the type is explicitly changed or until the
|
|||
end of the scope. This can have unforeseen consequences. For example, in
|
||||
the loop
|
||||
|
||||
example(for (( f = 0; f < 1; f += 0.1 )); do;
|
||||
example(for (( f = 0; f < 1; f += 0.1 )); do
|
||||
# use $f
|
||||
done)
|
||||
|
||||
|
|
|
@ -1162,7 +1162,7 @@ special tt(PATH) parameter is not altered in any way. It is also possible
|
|||
to create a local parameter using `tt(typeset +h )var(special)', where the
|
||||
local copy of var(special) will retain its special properties regardless of
|
||||
having the tt(-h) attribute. Global special parameters loaded from shell
|
||||
modules (currently those in tt(mapfile) and tt(parameter)) are
|
||||
modules (currently those in tt(zsh/mapfile) and tt(zsh/parameter)) are
|
||||
automatically given the tt(-h) attribute to avoid name clashes.
|
||||
)
|
||||
item(tt(-H))(
|
||||
|
@ -1440,7 +1440,7 @@ files compiled into it are listed. The first line of output shows
|
|||
the version of the shell which compiled the file and how the file
|
||||
will be used (i.e. by reading it directly or by mapping it into memory).
|
||||
With arguments, nothing is output and the return value is set to zero if
|
||||
definitions for em(all) var(name)s name files were found in the compiled
|
||||
definitions for em(all) var(name)s were found in the compiled
|
||||
file, and non-zero if the definition for at least one var(name) was not
|
||||
found.
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ tt(-K) option) which can examine the word components passed to it
|
|||
use its own criteria to decide what matches. If there is no
|
||||
completion, the original word is retained. Since the produced
|
||||
possible completions seldom have interesting common prefixes
|
||||
and suffixes, menucompletion is started immediately if tt(AUTO_MENU) is
|
||||
and suffixes, menu completion is started immediately if tt(AUTO_MENU) is
|
||||
set and this flag is used.
|
||||
)
|
||||
item(tt(-y) var(func-or-var))(
|
||||
|
@ -499,7 +499,7 @@ words those before the `tt(-x)'.
|
|||
)
|
||||
item(tt(-J) var(name))(
|
||||
This gives the name of the group the matches should be placed in. Groups
|
||||
are listed and sorted separately; likewise, menucompletion will offer
|
||||
are listed and sorted separately; likewise, menu completion will offer
|
||||
the matches in the groups in the order in which the groups were
|
||||
defined. If no group name is explicitly given, the matches are stored in
|
||||
a group named var(default). The first time a group name is encountered,
|
||||
|
@ -518,7 +518,7 @@ before all variables.
|
|||
)
|
||||
item(tt(-V) var(name))(
|
||||
Like tt(-J), but matches within the group will not be sorted in listings
|
||||
nor in menucompletion. These unsorted groups are in a different name
|
||||
nor in menu completion. These unsorted groups are in a different name
|
||||
space from the sorted ones, so groups defined as tt(-J files) and tt(-V
|
||||
files) are distinct.
|
||||
)
|
||||
|
|
|
@ -72,7 +72,7 @@ few utility functions, arrange for all the necessary shell functions to be
|
|||
autoloaded, and will then re-define all widgets that do completion to use the
|
||||
new system. If you use the tt(menu-select) widget, which is part of the
|
||||
tt(zsh/complist) module, you should make sure that that module is loaded
|
||||
before the call to tt(compinit) to make sure that that widget is also
|
||||
before the call to tt(compinit) so that that widget is also
|
||||
re-defined. If completion styles (see below) are set up to perform
|
||||
expansion as well as completion by default, and the TAB key is bound to
|
||||
tt(expand-or-complete), tt(compinit) will rebind it to tt(complete-word);
|
||||
|
@ -414,22 +414,6 @@ ifnzman(noderef(The zsh/zutil Module))).
|
|||
When looking up styles the completion system uses full context names,
|
||||
including the tag.
|
||||
|
||||
To have more control over when certain values for styles are used one
|
||||
can use the special parameters available in completion widgets (see
|
||||
ifzman(see zmanref(zshcompwid))\
|
||||
ifnzman(noderef(Completion Widgets)))\
|
||||
) and the tt(-e) option to tt(zstyle) that makes the value be
|
||||
evaluated when looked up. For example, to make the tt(completer)
|
||||
style have a different value when completion for the tt(cvs) command,
|
||||
one could use the tt(words) special array:
|
||||
|
||||
example(zstyle -e ':completion:*' completer '
|
||||
if [[ $words[1] = cvs ]]; then
|
||||
reply=(_complete)
|
||||
else
|
||||
reply=(_complete _approximate)
|
||||
fi')
|
||||
|
||||
Styles determine such things as how the matches are generated; some of them
|
||||
correspond to shell options (for example, the use of menu completion), but
|
||||
styles provide more specific control. They can have any number of strings as
|
||||
|
@ -467,6 +451,22 @@ builtin command uses the tags tt(jobs) and tt(processes), we can use:
|
|||
|
||||
example(zstyle ':completion:*:*:kill:*:jobs' verbose no)
|
||||
|
||||
To have more control over when certain values for styles are used one
|
||||
can use the special parameters available in completion widgets (see
|
||||
ifzman(see zmanref(zshcompwid))\
|
||||
ifnzman(noderef(Completion Widgets)))\
|
||||
) and the tt(-e) option to tt(zstyle) that makes the value be
|
||||
evaluated when looked up. For example, to make the tt(completer)
|
||||
style have a different value when completing for the tt(cvs) command,
|
||||
one could use the tt(words) special array:
|
||||
|
||||
example(zstyle -e ':completion:*' completer '
|
||||
if [[ $words[1] = cvs ]]; then
|
||||
reply=(_complete)
|
||||
else
|
||||
reply=(_complete _approximate)
|
||||
fi')
|
||||
|
||||
Note that the order in which styles are em(defined) does not matter; the
|
||||
style mechanism uses the most specific possible match for a particular
|
||||
style to determine the set of values. More precisely, strings are
|
||||
|
@ -1141,7 +1141,7 @@ descriptions separated by newlines.
|
|||
The `tt(%)' for the sequences that are replaced by strings provided by
|
||||
the completion functions like the `tt(%d)' may be followed by field
|
||||
width specifications as described for the tt(zformat) builtin command
|
||||
from the tt(zutil) module, see
|
||||
from the tt(zsh/zutil) module, see
|
||||
ifzman(zmanref(zshmodules))\
|
||||
ifnzman(noderef(The zsh/zutil Module))\
|
||||
.
|
||||
|
@ -1245,7 +1245,7 @@ except the current one will not be considered to be a possible
|
|||
completion.
|
||||
|
||||
The values `tt(current)' and `tt(current-shown)' are a bit like the
|
||||
opposite of the tt(accept-exact). It means that only strings with
|
||||
opposite of tt(accept-exact). They mean that only strings with
|
||||
missing characters will be completed.
|
||||
|
||||
Note that you almost certainly don't want to set this to `true' or
|
||||
|
@ -1334,7 +1334,7 @@ pending which has not yet been processed by the shell. If a var(val)
|
|||
is given, completion will not be done if there are at least that many
|
||||
characters of unprocessed input. This is often useful to have set when
|
||||
pasting characters into a terminal. Note however, that it relies on
|
||||
the tt($PENDING) special parameter from the tt(zle) module being set
|
||||
the tt($PENDING) special parameter from the tt(zsh/zle) module being set
|
||||
properly which is not guaranteed on all platforms.
|
||||
|
||||
The default value of this style is `true' unless when completing
|
||||
|
@ -1444,9 +1444,6 @@ width, padded to the right with spaces. As in other prompt strings, the
|
|||
escape sequences `tt(%S)', `tt(%s)', `tt(%B)', `tt(%b)', `tt(%U)',
|
||||
`tt(%u)', and `tt(%{)...tt(%})' for entering and leaving the display modes
|
||||
standout, bold and underline are also available.
|
||||
|
||||
Note that this style has a default value. If you don't want to use
|
||||
scrolling, set this style to an empty string.
|
||||
)
|
||||
kindex(list-rows-first, completion style)
|
||||
item(tt(list-rows-first))(
|
||||
|
@ -1585,18 +1582,18 @@ even then, the value `tt(yes=long-list)' can be used.
|
|||
|
||||
In addition to (or instead of) the above possibilities, the value may
|
||||
contain the string `tt(select)', optionally followed by an equals sign and a
|
||||
number. In this case menu-selection (as defined by the tt(zsh/complist)
|
||||
number. In this case menu selection (as defined by the tt(zsh/complist)
|
||||
module) will be started. Without the optional number, it will be started
|
||||
unconditionally and with a number it will be started only if at least that
|
||||
many matches are generated; if the values for more than one tag provide a
|
||||
number, the smallest number is taken. Menu selection can be turned off
|
||||
explicitly by defining a value containing the string `tt(no-select)'.
|
||||
|
||||
It is also possible to start menu-selection only if the list of
|
||||
It is also possible to start menu selection only if the list of
|
||||
matches does not fit on the screen by using the value
|
||||
`tt(select=long)'. This will only start menu-selection if the widget
|
||||
`tt(select=long)'. This will only start menu selection if the widget
|
||||
invoked does completion, not simply listing as done by
|
||||
tt(delete-char-or-list); to start menu-selection even here, use the value
|
||||
tt(delete-char-or-list); to start menu selection even here, use the value
|
||||
`tt(select=long-list)'.
|
||||
|
||||
To turn on menu completion or menu selection when a certain number of
|
||||
|
@ -1746,7 +1743,7 @@ removed, rather than just consecutive duplicates.
|
|||
kindex(select-prompt, completion style)
|
||||
item(tt(select-prompt))(
|
||||
If this is set for the tt(default) tag, its
|
||||
value will be displayed during menu-selection (see the tt(menu) style
|
||||
value will be displayed during menu selection (see the tt(menu) style
|
||||
above) when the completion list does not fit on the screen as a
|
||||
whole. The same escapes as for the tt(list-prompt) style are
|
||||
understood, but give the number of the match or line the mark is
|
||||
|
@ -1755,7 +1752,7 @@ on. A default prompt is used when the value is the empty string.
|
|||
kindex(select-scroll, completion style)
|
||||
item(tt(select-scroll))(
|
||||
This style is tested for the tt(default) tag and determines how a
|
||||
completion list is scrolled during a menu-selection (see the tt(menu)
|
||||
completion list is scrolled during a menu selection (see the tt(menu)
|
||||
style above) when the completion list does not fit on the screen as a
|
||||
whole. Its value should be `tt(0)' (zero) to scroll by
|
||||
half-screenfuls, a positive integer to scroll by that many lines and a
|
||||
|
@ -2093,7 +2090,7 @@ function returns.
|
|||
If the first argument to tt(_main_complete) is a single hyphen, the
|
||||
arguments will not be taken as names of completers. Instead, the
|
||||
second argument gives a name to use in the var(completer) field of the
|
||||
context and the other arguments give a command anme and arguments to
|
||||
context and the other arguments give a command name and arguments to
|
||||
call to generate the matches.
|
||||
|
||||
The following completer functions are contained in the distribution (users
|
||||
|
@ -2502,7 +2499,7 @@ store the name of the widget in the var(function) field of the context
|
|||
and call the completion system. This allows to easily define custom
|
||||
completion widgets with their own sets of style settings. For example,
|
||||
to define a widget that does normal completion and starts
|
||||
menu-selection, one could do:
|
||||
menu selection, one could do:
|
||||
|
||||
example(zle -C foo complete-word _generic
|
||||
bindkey '...' foo
|
||||
|
|
|
@ -74,7 +74,7 @@ vindex(CURRENT)
|
|||
item(tt(CURRENT))(
|
||||
This is the number of the current word, i.e. the word the cursor is
|
||||
currently on in the tt(words) array. Note that this value is only
|
||||
correct if the tt(ksharrays) options is not set.
|
||||
correct if the tt(ksharrays) option is not set.
|
||||
)
|
||||
vindex(IPREFIX)
|
||||
item(tt(IPREFIX))(
|
||||
|
@ -212,8 +212,8 @@ line. On entry to the widget function, if it is unset the command line is
|
|||
not to be changed; if set to tt(unambiguous), any prefix common to all
|
||||
matches is to be inserted; if set to tt(automenu-unambiguous), the
|
||||
common prefix is to be inserted and the next invocation of the
|
||||
completion code may start menucompletion (due to the tt(AUTO_MENU)
|
||||
option being set); if set to tt(menu) or tt(automenu) menucompletion
|
||||
completion code may start menu completion (due to the tt(AUTO_MENU)
|
||||
option being set); if set to tt(menu) or tt(automenu) menu completion
|
||||
will be started for the matches currently generated (in the
|
||||
latter case this will happen because the tt(AUTO_MENU) is set). The
|
||||
value may also contain the string `tt(tab)' when the completion code
|
||||
|
@ -227,12 +227,12 @@ Negative numbers count backward from the last match (with `tt(-1)'
|
|||
selecting the last match) and out-of-range values are wrapped
|
||||
around, so that a value of zero selects the last match and a value
|
||||
one more than the maximum selects the first. Unless the value of this
|
||||
key ends in a space, the match is inserted as in a menucompletion,
|
||||
key ends in a space, the match is inserted as in a menu completion,
|
||||
i.e. without automatically appending a space.
|
||||
|
||||
Both tt(menu) and tt(automenu) may also specify the the number of the
|
||||
match to insert, given after a colon. For example, `tt(menu:2)' says
|
||||
to start menucompletion, beginning with the second match.
|
||||
to start menu completion, beginning with the second match.
|
||||
|
||||
Note that a value containing the substring `tt(tab)' makes the
|
||||
matches generated be ignored and only the TAB be inserted.
|
||||
|
@ -261,7 +261,7 @@ list be shown even if there is only one match. Normally, the list
|
|||
would be shown only if there are at least two matches.
|
||||
|
||||
The value contains the substring tt(packed) if the tt(LIST_PACKED)
|
||||
option is set. If this substring is given for all matches added of a
|
||||
option is set. If this substring is given for all matches added to a
|
||||
group, this group will show the tt(LIST_PACKED) behavior. The same is
|
||||
done for the tt(LIST_ROWS_FIRST) option with the substring tt(rows).
|
||||
|
||||
|
@ -325,9 +325,9 @@ value of a parameter assignment.
|
|||
)
|
||||
vindex(pattern_insert, compstate)
|
||||
item(tt(pattern_insert))(
|
||||
Normally this is set to tt(menu), which specifies that menucompletion will
|
||||
Normally this is set to tt(menu), which specifies that menu completion will
|
||||
be used whenever a set of matches was generated using pattern matching. If
|
||||
it is set to any other non-empty string by the user and menucompletion is
|
||||
it is set to any other non-empty string by the user and menu completion is
|
||||
not selected by other option settings, the code will instead insert any
|
||||
common prefix for the generated matches as with normal completion.
|
||||
)
|
||||
|
@ -377,7 +377,7 @@ Specifies the occasions on which the cursor is moved to the end of a string
|
|||
when a match is inserted. On entry to a widget function, it may be
|
||||
tt(single) if this will happen when a single unambiguous match was inserted
|
||||
or tt(match) if it will happen any time a match is inserted (for example,
|
||||
by menucompletion; this is likely to be the effect of the tt(ALWAYS_TO_END)
|
||||
by menu completion; this is likely to be the effect of the tt(ALWAYS_TO_END)
|
||||
option).
|
||||
|
||||
On exit, it may be set to tt(single) as above. It may also be set to
|
||||
|
@ -785,7 +785,7 @@ true if the test for the tt(-N) option with both patterns would succeed.
|
|||
)
|
||||
enditem()
|
||||
|
||||
texinode(Matching Control)(Examples)(Condition Codes)(Completion Widgets)
|
||||
texinode(Matching Control)(Completion Widget Example)(Condition Codes)(Completion Widgets)
|
||||
sect(Matching Control)
|
||||
|
||||
It is possible by use of the
|
||||
|
@ -942,7 +942,8 @@ complete to strings like `tt(comp.source.unix)', i.e. the word on the
|
|||
command line consists of multiple parts, separated by a dot in this
|
||||
example, where each part should be completed separately --- note,
|
||||
however, that the case where each part of the word, i.e. `tt(comp)',
|
||||
`tt(source)' and `tt(unix)' in this example, is to be completed separately
|
||||
`tt(source)' and `tt(unix)' in this example, is to be completed from
|
||||
separate sets of matches
|
||||
is a different problem to be solved by the implementation of the
|
||||
completion widget. The example can be handled by:
|
||||
|
||||
|
@ -1021,9 +1022,9 @@ ifnzman(noderef(Completion System))\
|
|||
specific contexts by using the tt(matcher) and tt(matcher-list)
|
||||
styles. The values for the latter will be used everywhere.
|
||||
|
||||
texinode(Examples)()(Matching Control)(Completion Widgets)
|
||||
sect(Examples)
|
||||
cindex(completion widgets, examples)
|
||||
texinode(Completion Widget Example)()(Matching Control)(Completion Widgets)
|
||||
sect(Completion Widget Example)
|
||||
cindex(completion widgets, example)
|
||||
|
||||
The first step is to define the widget:
|
||||
|
||||
|
|
|
@ -630,7 +630,7 @@ item(tt(q))(
|
|||
Quote the resulting words with backslashes. If this flag is given
|
||||
twice, the resulting words are quoted in single quotes and if it is
|
||||
given three times, the words are quoted in double quotes. If it is
|
||||
given four times, the words are quoted in single quotes preceded a tt($).
|
||||
given four times, the words are quoted in single quotes preceded by a tt($).
|
||||
)
|
||||
item(tt(Q))(
|
||||
Remove one level of quotes from the resulting words.
|
||||
|
@ -884,7 +884,7 @@ item(tt(9.) em(Shell Word Splitting))(
|
|||
If no `tt((s))', `tt((f))' or `tt(=)' was given, but the word is not
|
||||
quoted and the option tt(SH_WORD_SPLIT) is set, the word is split on
|
||||
occurrences of any of the characters in tt($IFS). Note this step, too,
|
||||
take place at all levels of a nested substitution.
|
||||
takes place at all levels of a nested substitution.
|
||||
)
|
||||
item(tt(10.) em(Re-Evaluation))(
|
||||
Any `tt((e))' flag is applied to the value, forcing it to be re-examined
|
||||
|
@ -1642,7 +1642,7 @@ files on the device var(dev)
|
|||
)
|
||||
item(tt(l)[tt(-)|tt(PLUS())]var(ct))(
|
||||
files having a link count less than var(ct) (tt(-)), greater than
|
||||
var(ct) (tt(PLUS())), or is equal to var(ct)
|
||||
var(ct) (tt(PLUS())), or equal to var(ct)
|
||||
)
|
||||
item(tt(U))(
|
||||
files owned by the effective user ID
|
||||
|
@ -1726,7 +1726,7 @@ those in the current directory at each level of the search --- this is best
|
|||
combined with other criteria, for example `tt(odon)' to sort on names for
|
||||
files within the same directory. Note that tt(a), tt(m), and tt(c) compare
|
||||
the age against the current time, hence the first name in the list is the
|
||||
the youngest file. Also note that the modifiers tt(^) and tt(-) are used,
|
||||
youngest file. Also note that the modifiers tt(^) and tt(-) are used,
|
||||
so `tt(*(^-oL))' gives a list of all files sorted by file size in descending
|
||||
order, following any symbolic links.
|
||||
)
|
||||
|
|
|
@ -58,7 +58,7 @@ contain the definitions for all functions in the directory named
|
|||
var(element). The file is treated in the same manner as a directory
|
||||
containing files for functions and is searched for the definition of the
|
||||
function. If the definition is not found, the search for a definition
|
||||
proceeds with the the other two possibilities described below.
|
||||
proceeds with the other two possibilities described below.
|
||||
|
||||
If var(element) already includes a tt(.zwc) extension (i.e. the extension
|
||||
was explicitly given by the user), var(element) is searched for the
|
||||
|
|
|
@ -6,7 +6,7 @@ cindex(completion, coloured listings)
|
|||
cindex(completion, scroll listings)
|
||||
The tt(zsh/complist) module offers three extensions to completion listings:
|
||||
the ability to highlight matches in such a list, the ability to
|
||||
scroll through long lists and a different style of menu-completion.
|
||||
scroll through long lists and a different style of menu completion.
|
||||
|
||||
subsect(Colored completion listings)
|
||||
Whenever one of the parameters tt(ZLS_COLORS) or tt(ZLS_COLOURS) is set
|
||||
|
@ -63,11 +63,11 @@ for the left code (see below)
|
|||
item(tt(rc m))(
|
||||
for the right code
|
||||
)
|
||||
item(tt(tc) var(0))(
|
||||
item(tt(tc 0))(
|
||||
for the character indicating the file type printed after filenames if
|
||||
the tt(LIST_TYPES) option is set
|
||||
)
|
||||
item(tt(sp) var(0))(
|
||||
item(tt(sp 0))(
|
||||
for the spaces printed after matches to align the next column
|
||||
)
|
||||
item(tt(ec) var(none))(
|
||||
|
@ -94,7 +94,7 @@ equal signs. The first code will be used for all parts for which no
|
|||
explicit code is specified and the following codes will be used for
|
||||
the parts matched by the sub-patterns in parentheses. For example,
|
||||
the specification `tt(=(#b)(?)*(?)=0=3=7)' will be used for all
|
||||
matches which are at least two characters long and will make the use
|
||||
matches which are at least two characters long and will use
|
||||
the code `tt(3)' for the first character, `tt(7)' for the last
|
||||
character and `tt(0)' for the rest.
|
||||
|
||||
|
@ -187,14 +187,14 @@ cindex(completion, selecting by cursor)
|
|||
vindex(MENUSELECT)
|
||||
tindex(menu-select)
|
||||
The tt(zsh/complist) module also offers an alternative style of selecting
|
||||
matches from a list, called menu-selection, which can be used if the
|
||||
matches from a list, called menu selection, which can be used if the
|
||||
shell is set up to return to the last prompt after showing a
|
||||
completion list (see the tt(ALWAYS_LAST_PROMPT) option in
|
||||
ifzman(zmanref(zshoptions))\
|
||||
ifnzman(noderef(Options))\
|
||||
). It can be invoked directly by
|
||||
the widget tt(menu-select) defined by the module. Alternatively,
|
||||
the parameter tt(MENUSELECT) can be set to an integer, which give the
|
||||
the parameter tt(MENUSELECT) can be set to an integer, which gives the
|
||||
minimum number of matches that must be present before menu selection is
|
||||
automatically turned on. This second method requires that menu completion
|
||||
be started, either directly from a widget such as tt(menu-complete), or due
|
||||
|
@ -207,7 +207,7 @@ tt(MENUSELECT) parameter should not be used (like the tt(ZLS_COLORS)
|
|||
and tt(ZLS_COLOURS) parameters described above). Instead, the tt(menu)
|
||||
style should be used with the tt(select=)var(...) keyword.
|
||||
|
||||
After menu-selection is started, the matches will be listed. If there
|
||||
After menu selection is started, the matches will be listed. If there
|
||||
are more matches than fit on the screen, only the first screenful is
|
||||
shown. The
|
||||
matches to insert into the command line can be selected from this
|
||||
|
@ -227,7 +227,7 @@ used.
|
|||
|
||||
The tt(MENUSCROLL) parameter can be used to specify how the list is
|
||||
scrolled. If the parameter is unset, this is done line by line, if it
|
||||
is set to `tt(0)' (zero), the list will scrolled half the number of
|
||||
is set to `tt(0)' (zero), the list will scroll half the number of
|
||||
lines of the screen. If the value is positive, it gives the number of
|
||||
lines to scroll and if it is negative, the list will be scrolled
|
||||
the number of lines of the screen minus the (absolute) value.
|
||||
|
@ -244,7 +244,7 @@ completion function which added them explicitly requested that they
|
|||
not appear in the list (using the tt(-n) option of the tt(compadd)
|
||||
builtin command) or they are matches which duplicate a string already
|
||||
in the list (because they differ only in things like prefixes or
|
||||
suffixes that are not displayed). In the list used for menu-selection,
|
||||
suffixes that are not displayed). In the list used for menu selection,
|
||||
however, even these matches are shown so that it is possible to select
|
||||
them. To highlight such matches the tt(hi) and tt(du) capabilities in
|
||||
the tt(ZLS_COLORS) and tt(ZLS_COLOURS) parameters are supported for
|
||||
|
@ -273,7 +273,7 @@ select the next match to insert into the line
|
|||
)
|
||||
item(tt(accept-and-infer-next-history))(
|
||||
accepts the current match and then tries completion with
|
||||
menu-selection again; in the case of files this allows one to select
|
||||
menu selection again; in the case of files this allows one to select
|
||||
a directory and immediately attempt to complete files in it; if there
|
||||
are no matches, a message is shown and one can use tt(undo) to go back
|
||||
to completion on the previous level, every other key leaves menu
|
||||
|
@ -335,7 +335,7 @@ moves the mark to the previous match
|
|||
enditem()
|
||||
|
||||
All movement functions wrap around at the edges; any other zle function not
|
||||
listed leaves menu-selection and executes that function. It is possible to
|
||||
listed leaves menu selection and executes that function. It is possible to
|
||||
make widgets in the above list do the same by using the form of the widget
|
||||
with a `tt(.)' in front. For example, the widget `tt(.accept-line)' has
|
||||
the effect of leaving menu selection and accepting the entire command line.
|
||||
|
@ -345,12 +345,12 @@ key that is not defined in this keymap or that is bound to
|
|||
tt(undefined-key) is looked up in the keymap currently selected. This
|
||||
is used to ensure that the most important keys used during selection
|
||||
(namely the cursor keys, return, and TAB) have sensible defaults. However,
|
||||
keys in the the tt(menuselect) keymap can be modified directly using the
|
||||
keys in the tt(menuselect) keymap can be modified directly using the
|
||||
tt(bindkey) builtin command (see
|
||||
ifzman(zmanref(zshmodules))\
|
||||
ifnzman(noderef(The zsh/zle Module))\
|
||||
). For example, to make the return key leave menu-selection and
|
||||
continue with normal menu-completion one can call
|
||||
). For example, to make the return key leave menu selection without
|
||||
accepting the match currently selected one could call
|
||||
|
||||
indent(tt(bindkey -M menuselect '^M' send-break))
|
||||
|
||||
|
|
Loading…
Reference in a new issue