Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/3] Make a helper function global.
- X-seq: zsh-workers 39657
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/3] Make a helper function global.
- Date: Sun, 16 Oct 2016 17:14:48 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=til3g9XyH69s9JyqCjst7TlhojE=; b=baqGJb a6ti5wjMHqW16azJuIO3VGQj1HwEPr2uOf5XTLgnRRnqmM7urTElYUJQpNduHFnL vh4LQ6V/v6Tn/Pqy15vDr9/WfP19kVvq2q0GH5DSS/r3+NEimJAxDJCQ+v8Par54 9IKZWCwMjH7uzXAlb90qa1dcHhklQl/AMp/3Q=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=til3g9XyH69s9JyqCjst7Tlhoj E=; b=XeT8m5j3p8eL8eYQmJqjHsBGyn4SbRkLac0fYBP0baLyXLh1VHsblLRAN1 Ri7RggKmYXprKArlN59CfX5UYRlter1Y1EI9/KfGi0VxZTM49Y2tMAcwhWP0heFf jY9SYDyoPHQ3jWH/uMwdVYlC1MwpHrHW7sp5mVSezxzOmo+1M=
- 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
---
Completion/Zsh/Command/_zstyle | 16 ----------------
Completion/Zsh/Type/_completers | 14 ++++++++++++++
Doc/Zsh/compsys.yo | 10 ++++++++++
3 files changed, 24 insertions(+), 16 deletions(-)
create mode 100644 Completion/Zsh/Type/_completers
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index 20ff47f..dcebc6f 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -4,22 +4,6 @@ local state context ostate line expl ctop suf
local nm=$compstate[nmatches] taglist patterns pstyles contexts
typeset -A opt_args styles
-(( $+functions[_completers] )) ||
-_completers() {
- # option: -p - needs a `_' prefix
- local us
- local -a disp list expl
-
- list=( complete approximate correct match expand list menu oldlist
- ignored prefix history )
- zparseopts -D -K -E 'p=us'
- [[ -n "$us" ]] && us='_'
- zstyle -t ":completion:${curcontext}:completers" prefix-hidden &&
- disp=(-d list)
- _wanted completers expl 'completer' \
- compadd "$@" "$disp[@]" - "$us${^list[@]}"
-}
-
_vcs_info_hooks() {
compadd - ${functions[(I)+vi-*]#+vi-}
}
diff --git a/Completion/Zsh/Type/_completers b/Completion/Zsh/Type/_completers
new file mode 100644
index 0000000..87c986a
--- /dev/null
+++ b/Completion/Zsh/Type/_completers
@@ -0,0 +1,14 @@
+#autoload
+
+# option: -p - needs a `_' prefix
+local us
+local -a disp list expl
+
+list=( complete approximate correct match expand list menu oldlist
+ ignored prefix history )
+zparseopts -D -K -E 'p=us'
+[[ -n "$us" ]] && us='_'
+zstyle -t ":completion:${curcontext}:completers" prefix-hidden &&
+ disp=(-d list)
+_wanted completers expl 'completer' \
+ compadd "$@" "$disp[@]" - "$us${^list[@]}"
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 260ace4..a56ca67 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4246,6 +4246,16 @@ 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(_completers)
+item(tt(_completers) [ tt(-p) ])(
+This function completes names of completers.
+
+startitem()
+item(tt(-p))(
+Include the leading underscore (`tt(_)') in the matches.
+)
+enditem()
+)
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) ... ])
Messages sorted by:
Reverse Date,
Date,
Thread,
Author