Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	daniel.shahaf.name; h=content-type:date:from:message-id
	:mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=BhV
	+QaU/iElNynv0PKLNAR9uOpI=; b=2gjyeOt6uFqXxV+pfRFOnerVjVBcA+SMtS5
	g1FjYVlE36EVe/Ttm3wsumUUaLMFEklgV0IFJ3QVggdFl5dx5bdAGjTMbUrBUHn1
	DdEZUBK0wv1QOJP/Pt/qKRYaHnNazRPE748BAzmodml+zLLJEj7dVQmumXIqvHZf
	zp1MQhsE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	messagingengine.com; h=content-type:date:from:message-id
	:mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Bh
	V+QaU/iElNynv0PKLNAR9uOpI=; b=R8n+S9K31fGO4xdQsKNaUiJ0tG2F+mY7q7
	EFMaA25m+FOYUCCDQD2dMXiRtdaa7xXaQry+SLJh0e3zYfSfc8FIRwQ/N3t+ki4F
	uZuWqJnqMrgJ7342WNzDRmNGbzrnGuipC6cxyErVpGpbKik0704WkhlLo97I3a5v
	UAHXq9l30=
X-Sasl-enc: qLhwuDbXAiiHXCbfKqXAb04onbGPziE4MlEhbi/Y7gq2 1453084602
Date: Mon, 18 Jan 2016 02:36:39 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 1/3] docs: Document the completion function _command_names.
Message-ID: <20160118023639.GB1880@tarsus.local2>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Seq: zsh-workers 37664

---
 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

