zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/3] docs: Document the completion function _command_names.
@ 2016-01-18  2:36 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2016-01-18  2:36 UTC (permalink / raw)
  To: zsh-workers

---
 Completion/Unix/Type/_path_commands | 3 +++
 Doc/Zsh/compsys.yo                  | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands
index 423563c..66795ae 100644
--- a/Completion/Unix/Type/_path_commands
+++ b/Completion/Unix/Type/_path_commands
@@ -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))
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index d6b1803..9954f30 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -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) ... ])
-- 
2.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-18  2:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18  2:36 [PATCH 1/3] docs: Document the completion function _command_names Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).