* [PATCH] _add-zsh-hook: add -L
@ 2018-04-30 12:31 Daniel Hahler
2018-05-01 7:48 ` Oliver Kiddle
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hahler @ 2018-04-30 12:31 UTC (permalink / raw)
To: zsh-workers
From: Daniel Hahler <git@thequod.de>
---
Completion/Zsh/Function/_add-zsh-hook | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Completion/Zsh/Function/_add-zsh-hook b/Completion/Zsh/Function/_add-zsh-hook
index e8ae97052..cb01cf5f6 100644
--- a/Completion/Zsh/Function/_add-zsh-hook
+++ b/Completion/Zsh/Function/_add-zsh-hook
@@ -14,8 +14,9 @@ _add-zsh-hook() {
local context state state_descr line
typeset -A opt_args
_arguments -s -w -S : \
- '(-D)-d[remove HOOK from the array]' \
- '(-d)-D[interpret HOOK as pattern to remove from the array]' \
+ '(-D,-L)-d[remove HOOK from the array]' \
+ '(-d,-L)-D[interpret HOOK as pattern to remove from the array]' \
+ '(-d,-D)-L[list current values of the array with typeset]' \
{-U,-z,-k}"[passed to 'autoload']" \
':hook class:(chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name)' \
':hook function:_add-zsh-hook_hooks'
--
2.17.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] _add-zsh-hook: add -L
2018-04-30 12:31 [PATCH] _add-zsh-hook: add -L Daniel Hahler
@ 2018-05-01 7:48 ` Oliver Kiddle
2018-05-01 8:56 ` [PATCH] _add-zsh-hook: add -L and improve descriptions Daniel Hahler
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kiddle @ 2018-05-01 7:48 UTC (permalink / raw)
To: Daniel Hahler; +Cc: zsh-workers
Daniel Hahler wrote:
>
> --- a/Completion/Zsh/Function/_add-zsh-hook
> @@ -14,8 +14,9 @@ _add-zsh-hook() {
> - '(-D)-d[remove HOOK from the array]' \
> - '(-d)-D[interpret HOOK as pattern to remove from the array]' \
> + '(-D,-L)-d[remove HOOK from the array]' \
> + '(-d,-L)-D[interpret HOOK as pattern to remove from the array]' \
> + '(-d,-D)-L[list current values of the array with typeset]' \
You need spaces rather commas inside the exclusion list.
I'd also convert HOOK to lowercase while you're there. Those
descriptions look like they have been copied and pasted from
documentation where full usage has been presented first - something
like:
add-zsh-hook [ -L | -dD ] [ -Uzk ] HOOK FUNCTION
In completion, we're not presenting the information that the first
normal argument is 'HOOK'.
Oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] _add-zsh-hook: add -L and improve descriptions
2018-05-01 7:48 ` Oliver Kiddle
@ 2018-05-01 8:56 ` Daniel Hahler
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Hahler @ 2018-05-01 8:56 UTC (permalink / raw)
To: zsh-workers; +Cc: Oliver Kiddle
From: Daniel Hahler <git@thequod.de>
---
Completion/Zsh/Function/_add-zsh-hook | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Completion/Zsh/Function/_add-zsh-hook b/Completion/Zsh/Function/_add-zsh-hook
index e8ae97052..f570aca92 100644
--- a/Completion/Zsh/Function/_add-zsh-hook
+++ b/Completion/Zsh/Function/_add-zsh-hook
@@ -14,8 +14,9 @@ _add-zsh-hook() {
local context state state_descr line
typeset -A opt_args
_arguments -s -w -S : \
- '(-D)-d[remove HOOK from the array]' \
- '(-d)-D[interpret HOOK as pattern to remove from the array]' \
+ '(-D -L)-d[remove hook from the array]' \
+ '(-d -L)-D[interpret hook as pattern to remove from the array]' \
+ '(-d -D)-L[list current values of the array with typeset]' \
{-U,-z,-k}"[passed to 'autoload']" \
':hook class:(chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name)' \
':hook function:_add-zsh-hook_hooks'
--
2.17.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-01 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 12:31 [PATCH] _add-zsh-hook: add -L Daniel Hahler
2018-05-01 7:48 ` Oliver Kiddle
2018-05-01 8:56 ` [PATCH] _add-zsh-hook: add -L and improve descriptions Daniel Hahler
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).