From e17fc5079394ce0c30dc0573676983e6f4a0a5bc Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 7 Mar 2006 12:50:56 +0000 Subject: 22328, modified: add -o option to compadd add _list_files helper to handle new file-list style for _path_files --- Doc/Zsh/compsys.yo | 30 ++++++++++++++++++++++++++++++ Doc/Zsh/compwid.yo | 8 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) (limited to 'Doc/Zsh') diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 11c50cf61..5c844e133 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1263,6 +1263,36 @@ given, the name will only be completed if parameters of that type are required in the particular context. Names for which no type is specified will always be completed. ) +kindex(file-list, completion style) +item(tt(file-list))( +This style controls whether files completed using the standard builtin +mechanism are to be listed with a long list similar to tt(ls -l) +(although note that this feature actually uses the shell module +tt(zsh/stat) for file information). + +The style may either be set to a true value (or `tt(all)'), or +one of the values `tt(insert)' or `tt(list)', indicating that files +are to be listed in long format in all circumstances, or when +attempting to insert a file name, or when listing file names +without attempting to insert one. + +More generally, the value may be an array of any of the above values, +optionally followed by tt(=)var(num). If var(num) is present it +gives the maximum number of matches for which long listing style +will be used. For example, + +example(zstyle ':completion:*' file-list list=20 insert=10) + +specifies that long format will be used when listing up to 20 files +or inserting a file with up to 10 matches (assuming a listing +is to be shown at all, for example on an ambiguous completion), else short +format will be used. + +example(zstyle -e ':completion:*' file-list '(( ${+NUMERIC} )) && reply=(true)') + +specifies that long format will be used any time a numeric argument is +supplied, else short format. +) kindex(file-patterns, completion style) item(tt(file-patterns))( This is used by the standard function for completing filenames, diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo index bdbdd99da..8ffc96a2e 100644 --- a/Doc/Zsh/compwid.yo +++ b/Doc/Zsh/compwid.yo @@ -436,7 +436,7 @@ sect(Builtin Commands) startitem() findex(compadd) cindex(completion widgets, adding specified matches) -xitem(tt(compadd) [ tt(-akqQfenUl12C) ] [ tt(-F) var(array) ]) +xitem(tt(compadd) [ tt(-akqQfenUld12C) ] [ tt(-F) var(array) ]) xitem([ tt(-P) var(prefix) ] [ tt(-S) var(suffix) ]) xitem([ tt(-p) var(hidden-prefix) ] [ tt(-s) var(hidden-suffix) ]) xitem([ tt(-i) var(ignored-prefix) ] [ tt(-I) var(ignored-suffix) ]) @@ -530,6 +530,12 @@ This option only has an effect if used together with the tt(-d) option. If it is given, the display strings are listed one per line, not arrayed in columns. ) +item(tt(-o))( +This option only has an effect if used together with the tt(-d) +option. If it is given, the order of the output is determined by the +match strings; otherwise it is determined by the display strings +(i.e. the strings given by the tt(-d) option). +) item(tt(-J) var(name))( Gives the name of the group of matches the words should be stored in. ) -- cgit 1.4.1