>From ed7cddd08d7e3bcf7d60349917ecc50461f50dd1 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 30 Sep 2015 17:41:55 +0000 Subject: [PATCH 1/2] compdef documentation: Move an example. --- Doc/Zsh/compsys.yo | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index d6b1803..955b300 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -455,6 +455,11 @@ xitem(tt(compdef -k) [ tt(-an) ] var(function style key-sequence) [ var(key-sequ item(tt(compdef -K) [ tt(-an) ] var(function name style key-seq) [ var(name style seq) ... ])( The first form defines the var(function) to call for completion in the given contexts as described for the tt(#compdef) tag above. +For example, + +example(compdef _pids foo) + +uses the function tt(_pids) to complete process IDs for the command tt(foo). Alternatively, all the arguments may have the form `var(cmd)tt(=)var(service)'. Here var(service) should already have been @@ -513,13 +518,6 @@ autoloadable, equivalent to tt(autoload -U )var(function). ) enditem() -The function tt(compdef) can be used to associate existing completion -functions with new commands. For example, - -example(compdef _pids foo) - -uses the function tt(_pids) to complete process IDs for the command tt(foo). - Note also the tt(_gnu_generic) function described below, which can be used to complete options for commands that understand the `tt(-)tt(-help)' option. -- 2.1.4