zsh-workers
 help / color / mirror / code / Atom feed
38cfbccc5bfe4e2f68f518f75e5f9a6d60d18fd0 blob 2157 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
#autoload

local comp pat val name i ret=1 _compskip="$_compskip"
local curcontext="$curcontext" service str noskip
local -a match mbegin mend

# If we get the option `-s', we don't reset `_compskip'.

if [[ "$1" = -s ]]; then
  noskip=yes
  shift
fi

[[ -z "$noskip" ]] && _compskip=

curcontext="${curcontext%:*:*}:${1}:"

shift

# See if there are any matching pattern completions.

if [[ "$_compskip" != (all|*patterns*) ]]; then

  for str in "$@"; do
    [[ -n "$str" ]] || continue
    service="${_services[$str]:-$str}"
    for i in "${(@)_patcomps[(K)$str]}"; do
      if [[ $i = (#b)"="([^=]#)"="(*) ]]; then
	service=$match[1]
	i=$match[2]
      fi
      eval "$i" && ret=0
      if [[ "$_compskip" = *patterns* ]]; then
        break
      elif [[ "$_compskip" = all ]]; then
        _compskip=''
        return ret
      fi
    done
  done
fi

# Now look up the names in the normal completion array.

ret=1
for str in "$@"; do
  [[ -n "$str" ]] || continue
  # The following means we look up the names of commands
  # after stripping quotes.  This is presumably correct,
  # but do we need to do the same elsewhere?
  str=${(Q)str}
  name="$str"
  comp="${_comps[$str]}"
  service="${_services[$str]:-$str}"

  [[ -z "$comp" ]] || break
done

# And generate the matches, probably using default completion.

if [[ -n "$comp" && "$name" != "${argv[-1]}" ]]; then
  _compskip=patterns
  {
    eval "$comp" && ret=0
  } always {
    if (( TRY_BLOCK_ERROR )); then
      ... throw the exception ... 
    fi
  }
  [[ "$_compskip" = (all|*patterns*) ]] && return ret
fi

if [[ "$_compskip" != (all|*patterns*) ]]; then
  for str; do
    [[ -n "$str" ]] || continue
    service="${_services[$str]:-$str}"
    for i in "${(@)_postpatcomps[(K)$str]}"; do
      _compskip=default
      eval "$i" && ret=0
      if [[ "$_compskip" = *patterns* ]]; then
        break
      elif [[ "$_compskip" = all ]]; then
        _compskip=''
        return ret
      fi
    done
  done
fi

[[ "$name" = "${argv[-1]}" && -n "$comp" &&
   "$_compskip" != (all|*default*) ]] &&
  service="${_services[$name]:-$name}" &&
   eval "$comp" && ret=0

_compskip=''

return ret
debug log:

solving 8c5220f ...
found 8c5220f in https://inbox.vuxu.org/zsh-workers/20160928102417.GA2729@fujitsu.shahaf.local2/
found 3f6fe5b in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 3f6fe5b97c484bd1e00328e750882a569a8f1cea	Completion/Base/Core/_dispatch

applying [1/1] https://inbox.vuxu.org/zsh-workers/20160928102417.GA2729@fujitsu.shahaf.local2/
diff --git a/Completion/Base/Core/_dispatch b/Completion/Base/Core/_dispatch
index 3f6fe5b..8c5220f 100644

1:14: trailing whitespace.
      ... throw the exception ... 
Checking patch Completion/Base/Core/_dispatch...
Applied patch Completion/Base/Core/_dispatch cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 38cfbccc5bfe4e2f68f518f75e5f9a6d60d18fd0	Completion/Base/Core/_dispatch

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