1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 18:30:55 +01:00

zsh-workers/8911

This commit is contained in:
Tanaka Akira 1999-12-06 11:39:12 +00:00
parent fb5a1bc4dc
commit bb93d135ba
15 changed files with 264 additions and 141 deletions

View file

@ -762,11 +762,13 @@ values. In all these cases any of the strings `tt(true)', `tt(on)',
every other value (or if the style is not set at all for the context
in which it is looked up) stands for `false'.
em(NOTE: Maybe we should sort them differently. Or maybe we should
explain some of them only when explaining the completers that use
them.)
startitem()
item(tt(accept-exact))(
This is tested for the default tag and the tags used when generating
matches. If it is set to `true' for at least one match which is the
same as the string on the line, this match will immediatly be
accepted.
)
item(tt(arguments))(
The value of this style is given to the tt(ps) command by functions
that call it when generating process identifiers as matches.
@ -933,10 +935,13 @@ completion only if no unambiguous string could be generated that is at
least as long as the original string from the line.
)
item(tt(last-prompt))(
This is used by the main completion function tt(_main_complete) with
no particular context name. If it
is `true', the cursor will always be moved back to the last prompt if
that is still visible, independent of the setting of the
This is used to determine if thecompletion code should try to put the
cursor back onto the previous command line after showing a completion
listing (as for the tt(ALWAYS_LAST_PROMPT) option). Like several other
styles it is tested for the tt(default) tag and all tags used when
generating matches. The cursor will be moved back to the previous line
if this style is `true' for all types of matches added. Note also that
this is independent of the numeric argument -- unlike the
tt(ALWAYS_LAST_PROMPT) option.
)
item(tt(list))(
@ -1003,6 +1008,18 @@ example(compstyle '*:default' list-colors ${(s.:.)LS_COLORS})
And to get the default colors (which are the same as for the GNU
tt(ls) command) one should set the style to an empty value.
)
item(tt(list-packed))(
Like the tt(list-colors) style, this is tested with the tt(default)
tag and all tags used when generating matches. If it is set to `true'
for a tag, the matches added for it will be listed as if the
tt(LIST_PACKED) option were set for them. If it is set to `false',
they are listed normally.
)
item(tt(list-rows-first))(
This style is tested like the tt(list-packed) style and determines if
matches are to be listed in a rows-first fashion, as for the
tt(LIST_ROWS_FIRST) option.
)
item(tt(local))(
This style is used by completion functions which generate URLs as
possible matches to add suitable matches when a URL points to a
@ -1041,7 +1058,7 @@ This is used by the tt(_expand) completer. If it is unset or set to
an empty value, the words resulting from expansion (if any) will
simply be inserted in the command line, replacing the original
string. However, if this style is set to a non-empty value, the user
can cycle through the expansion as in menucompletion. Unless the value
can cycle through the expansions as in menucompletion. Unless the value
contains the string `tt(only)', the user will still be offered all
expansions at once as one of the strings to insert in the command
line; normally, this possibility is offered first, but if the value
@ -1772,6 +1789,12 @@ only for a boolean value, you can give a third argument which is then
used as a pattern and tt(_style) returns zero if the pattern matches
the value defined for the style.
The tt(-t) and tt(-f) options can be used to test for slightly
different interpretions of boolean values. If they are given with a
tag and a style-name as arguments, the return value is zero only if
the style is set and the value is equal (or, in case of then tt(-f)
option: unequal) to one of the values mentioned above.
If you want to retrieve the value defined for the style, you can use
one of the options tt(-b) (to retrieve it as a boolean value, i.e. one
of tt(yes) or tt(no)), tt(-s) (to get it as a scalar, i.e. a string

View file

@ -235,17 +235,22 @@ is unset or empty they will never be listed; if its value begins with
tt(list), they will always be listed; if it begins with tt(autolist)
or tt(ambiguous), they will be listed when the tt(AUTO_LIST) or
tt(LIST_AMBIGUOUS) options respectively would normally cause them to
be. Finally, if the value contains the string tt(explanations), only
the explanation strings, if any, will be listed. It will be set
be.
If the substring tt(force) appears in the value, this makes the
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
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).
Finally, if the value contains the string tt(explanations), only the
explanation strings, if any, will be listed. It will be set
appropriately on entry to a completion widget and may be changed
there.
)
item(tt(force_list))(
If the value for the tt(list) key is tt(autolist) or tt(ambiguous), the list will
normally be shown only if there are at least two matches in the
list. Setting tt(force_list) to an non-empty string forces the list to be
shown even if there is only one match.
)
item(tt(list_max))(
Initially this is set to the value of the tt(LISTMAX) parameter.
It may be set to any other numeric value; when the widget exits this value
@ -259,18 +264,21 @@ line to this value, this is available as the value of the tt(BLINES)
special parameter.
)
item(tt(last_prompt))(
If this is set to an non-empty string, the completion code will move
the cursor back to the previous prompt after the list of completions
has been displayed. Initially this is set or unset according to
the tt(ALWAYS_LAST_PROMPT) option.
If this is set to an non-empty string for every match added, the
completion code will move the cursor back to the previous prompt after
the list of completions has been displayed. Initially this is set or
unset according to the tt(ALWAYS_LAST_PROMPT) option.
)
item(tt(insert))(
This controls the manner in which a match is inserted into the command
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(menu) or tt(automenu) the usual
behaviour of the tt(MENU_COMPLETE) or tt(AUTO_MENU) options, respectively,
is to be used.
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 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 due to (in the
latter case this will happen because the tt(AUTO_MENU) is set).
On exit it may be set to any of the values above (where setting it to
the empty string is the same as unsetting it), or to a number, in which

View file

@ -591,7 +591,9 @@ Used for printing select lists and for the line editor.
)
vindex(LISTMAX)
item(tt(LISTMAX))(
In the line editor, the number of filenames to list without asking first.
In the line editor, the number of matches to list without asking
first. If the value is negative, the list will be shown if it spans at
most as many lines as given by the absolute value.
If set to zero, the shell asks only if the top of the listing would scroll
off the screen.
)