Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _add-zle-hook-widget: New completion.
- X-seq: zsh-workers 38873
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _add-zle-hook-widget: New completion.
- Date: Sun, 17 Jul 2016 12:21:19 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=pEZ2asxQf1k0k0Q1lTrBKctZUpY/Kp01mmZykU6mA9E=; b=RuahuF6BN2/IY19AWgrktksecqR7pYxLc86Gy6xeEnhzc5rlr29Yuy4J+kh2qygOpe Zv0TeFN4m9KxJ0pHQbSDzOTNaUEIvgoD4kO60OVODGaeE/hL6u2/1arWfCC3jSB+zAIH rrviYMPophVzEeAHkDmQqroa61r2Pr8Kh2qLtN814QGVYJwlSjYAzXR3s5/ntWerDyT4 ZOASKrn2SYwT0g0fBNFr4MZbPc0EwmW4MvLsKePgRumjyuQstOjNdPjuiKNFZFduIdsx sGuK3mgzwzd70jf3ufNzc1tuuYv5T5pwm8YO50UfgQZ9scT2pROy9jmBp0HNfUIAIgWs so5g==
- In-reply-to: <1468767614-9635-1-git-send-email-danielsh@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <160716185103.ZM5258@torch.brasslantern.com> <1468767614-9635-1-git-send-email-danielsh@tarsus.local2>
On Jul 17, 3:00pm, Daniel Shahaf wrote:
}
} I wanted to use 'autoload +X add-zle-hook-widget; zstyle -g reply
} zle-hook types' to avoid duplicating $hooktypes, but couldn't get it
} to work. (Neither with -k nor with -z was the style defined)
Er, yeah:
The flag +X attempts to load each NAME as an autoloaded function,
but does _not_ execute it.
This is in part why I went to some lengths to be able to "source" the
file as well as autoload it.
You could do this:
_add-zle-hook-widget_classes() {
local -a hooktypes=( ${^${=${(f)"$( add-zle-hook-widget -h )"}[3]}} )
compadd "$@" -M 'L:|zle-=' -a hooktypes
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author