summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Zsh/Command/_zstyle16
-rw-r--r--Completion/Zsh/Type/_completers14
-rw-r--r--Doc/Zsh/compsys.yo10
4 files changed, 30 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d638dfdb..9e1beba1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-18 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 39657: Completion/Zsh/Command/_zstyle,
+ Completion/Zsh/Type/_completers, Doc/Zsh/compsys.yo: Make a
+ helper function global.
+
2016-10-16 Daniel Shahaf <d.s@daniel.shahaf.name>
* 39500: Src/Zle/computil.c: compdescribe: perform
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index 20ff47f87..dcebc6faf 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 000000000..87c986a17
--- /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 260ace4ac..a56ca6721 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) ... ])