From 42e5f591f5227d829ca27fd534c34400d92a8553 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 4 Mar 2015 02:57:20 +0000 Subject: 34640: clarify documentation for _guard function --- ChangeLog | 5 +++++ Doc/Zsh/compsys.yo | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb5c0a207..2be4a7f65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-03-04 Peter Stephenson + + * Daniel Shahaf: 34640: Doc/Zsh/compsys.yo: clarify + documentation for _guard function. + 2015-03-03 Peter Stephenson * Matthew Martin: 34637: Completion/BSD/Command/_mixerctl: diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 5890f1704..89cd05121 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -4278,12 +4278,12 @@ option `tt(-)tt(-help)'. ) findex(_guard) item(tt(_guard) [ var(options) ] var(pattern descr))( -This function is intended to be used in the var(action) for -the specifications passed to tt(_arguments) and similar functions. It -returns immediately with a non-zero return status if -the string to be completed does not match the var(pattern). If the -pattern matches, the var(descr) is displayed; the function then returns -status zero if the word to complete is not empty, non-zero otherwise. +This function displays var(descr) if var(pattern) matches the string to +be completed. It is intended to be used in the var(action) for the +specifications passed to tt(_arguments) and similar functions. + +The return status is zero if the message was displayed and the word to +complete is not empty, and non-zero otherwise. The var(pattern) may be preceded by any of the options understood by tt(compadd) that are passed down from tt(_description), namely tt(-M), -- cgit 1.4.1