zsh-workers
 help / color / mirror / code / Atom feed
2cf8c229ad84c6a6cae76788714e127b41a752aa blob 1608 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
#autoload

# This should be used to complete parameter names if you need some of the
# extra options of compadd. It completes only non-local parameters.

# If you specify a -g option with a pattern, the pattern will be used to
# restrict the type of parameters matched.

if compset -P '*:'; then
  _history_modifiers p
  return
fi

local i pfilt 
local -i nm=$compstate[nmatches]
local -a expl pattern=(-g \*) normal described verbose faked fakes tmp

zstyle -t ":completion:${curcontext}:parameters" prefix-needed &&
    [[ $PREFIX != [_.]* ]] &&
        pfilt='[^_.]'
_description parameters expl parameter
zparseopts -D -K -E g:=pattern

if zstyle -t ":completion:${curcontext}:parameters" extra-verbose; then
  described=(
      "${(@M)${(@k)parameters[(R)$~pattern[2]~*(hideval|local|special)*]}:#$~pfilt*}"
  )
  compadd "$@" "$expl[@]" -D described -a - described
  if (( $#described )); then
    verbose=( ${${${(f@)"$( typeset -m $described )"}/=/:}[@]//'\'/'\\'} )
    _describe -t parameters parameter verbose "$@" "$expl[@]"
  fi

  normal=(
      "${(@M)${(@k)parameters[(R)$~pattern[2]~^(*(hideval|special)*)~*local*]}:#$~pfilt*}"
  )
else
  normal=( "${(@M)${(@k)parameters[(R)$~pattern[2]~*local*]}:#$~pfilt*}" )
fi

if zstyle -a ":completion:${curcontext}:" fake-parameters tmp; then
  for i in "$tmp[@]"; do
    if [[ "$i" = *:* ]]; then
      faked=( "$faked[@]" "$i" )
    else
      fakes=( "$fakes[@]" "$i" )
    fi
  done
fi
compadd "$@" "$expl[@]" - "$normal[@]" "${(@)fakes:|described}" \
    "${(@)${(@)${(@M)faked:#${~pattern[2]}}%%:*}:|described}"

(( compstate[nmatches] > nm ))
debug log:

solving 2cf8c229a ...
found 2cf8c229a in https://inbox.vuxu.org/zsh-workers/CAHLkEDsLhV6ZWoo3G-ULG0o6TvBtnE8n7c+sjeYuNz3yZ7bRoQ@mail.gmail.com/
found 00c181e11 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 00c181e112958a624698b4d85620fb8b39f55bf1	Completion/Zsh/Type/_parameters

applying [1/1] https://inbox.vuxu.org/zsh-workers/CAHLkEDsLhV6ZWoo3G-ULG0o6TvBtnE8n7c+sjeYuNz3yZ7bRoQ@mail.gmail.com/
diff --git a/Completion/Zsh/Type/_parameters b/Completion/Zsh/Type/_parameters
index 00c181e11..2cf8c229a 100644

1:11: trailing whitespace.
local i pfilt 
Checking patch Completion/Zsh/Type/_parameters...
Applied patch Completion/Zsh/Type/_parameters cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 2cf8c229ad84c6a6cae76788714e127b41a752aa	Completion/Zsh/Type/_parameters

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