zsh-workers
 help / color / mirror / code / Atom feed
df9a2f339cd1eab5672cb521133dd002fda7d083 blob 1101 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
 
#autoload

# Options (only in separate words):
#
# -a  use all signals (even the pseudo-signals)
# -p  needs a `-' prefix
# -s  SIG prefix allowed
#
# A `-' or `--' as the first argument is ignored.

local expl minus pre sigs
local first last # keep these as strings for -z/-n tests

zparseopts -D -K -E 'p=minus' 'a=last' 's=pre'
if [[ -z "$last" ]]; then
  first=2
  last=-3
else
  first=1
  last=-1
fi
[[ -n "$minus" ]] && minus='-'

[[ "$1" = -(|-) ]] && shift

if [[ -z "$minus" ]] ||
   ! zstyle -T ":completion:${curcontext}:signals" prefix-needed ||
   [[ -prefix -* ]]; then
  local disp tmp

  if zstyle -t ":completion:${curcontext}:signals" prefix-hidden; then
    tmp=( "${(@)signals[first,last]}" )
    disp=(-d tmp)
  else
    disp=()
  fi

  if [[ -n "$pre" && $PREFIX = ${minus}S* ]]; then
    sigs=( "${minus}SIG${(@)^signals[first,last]}" )
    (( $#disp )) && tmp=( "$tmp[@]" "${(@)signals[first,last]}" )
  else
    sigs=()
  fi

  _wanted signals expl signal \
      compadd "$@" "$disp[@]" -M 'm:{a-z}={A-Z}' - \
              "${minus}${(@)^signals[first,last]}" "$sigs[@]"
fi
debug log:

solving df9a2f3 ...
found df9a2f3 in https://git.vuxu.org/mirror/zsh/

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