1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-26 18:01:03 +02:00

37664: docs: Document the completion function _command_names.

This commit is contained in:
Daniel Shahaf 2016-01-18 02:36:39 +00:00
parent cfa8d8bcad
commit 9df6c728e8
3 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2016-01-20 Daniel Shahaf <d.s@daniel.shahaf.name>
* 37664: Completion/Unix/Type/_path_commands, Doc/Zsh/compsys.yo:
docs: Document the completion function _command_names.
2016-01-19 Peter Stephenson <p.stephenson@samsung.com>
* 37693: Src/glob.c: turn Dash into '-' in glob qualifiers.

View file

@ -82,6 +82,9 @@ if [[ -n $need_desc ]]; then
else
_wanted commands expl 'external command' compadd "$@" -k commands && ret=0
fi
# TODO: this is called from '_command_names -e' which is typically used in
# contexts (such as _env) that don't accept directory names. Should this
# 'if' block move up to the "_command_names -" branch of _command_names?
if [[ -o path_dirs ]]; then
local -a path_dirs
path_dirs=(${^path}/*(/N:t))

View file

@ -4203,6 +4203,12 @@ All arguments after the required field name are passed to
tt(compadd) when generating matches from the style value, or to
the functions for the fields if they are called.
)
findex(_command_names)
item(tt(_command_names) [ tt(-e) | tt(-) ])(
This function completes words that are valid at command position: names of
aliases, builtins, hashed commands, functions, and so on. With the tt(-e)
flag, only hashed commands are completed. The tt(-) flag is ignored.
)
findex(_describe)
redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ @ @ @ @ ))ifnztexi( )))
xitem(tt(_describe )[tt(-12JVx)] [ tt(-oO) | tt(-t) var(tag) ] var(descr) var(name1) [ var(name2) ] [ var(opt) ... ])