1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

39657: Make a helper function global.

This commit is contained in:
Daniel Shahaf 2016-10-16 17:14:48 +00:00
parent a8754b63fc
commit 13cfa036c8
4 changed files with 30 additions and 16 deletions

View file

@ -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

View file

@ -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-}
}

View file

@ -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[@]}"

View file

@ -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) ... ])