zsh-workers
 help / color / mirror / code / Atom feed
989772c5d7f7315125c9e989ae77c40b7a220e6d blob 3366 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
 
#compdef killall killall5

if [[ $service = killall5 || $OSTYPE != (linux|*bsd|dragonfly|darwin)* ]]; then
  _signals -p
  return
fi

typeset -a opts args
[[ $EUID = 0 || $_comp_priv_prefix[1] = sudo ]] && opts=( -a )

if _pick_variant psmisc=PSmisc unix --version; then

  local curcontext=$curcontext state state_descr line ret=1
  typeset -A opt_args
  args=(
    '(-e --exact)'{-e,--exact}'[require exact match for names longer than 15 chars]'
    '(-I --ignore-case)'{-I,--ignore-case}'[do case insensitive process name match]'
    '(-g --process-group)'{-g,--process-group}'[kill the process group to which the process blongs]'
    '(-i --interactive)'{-i,--interactive}'[interactively ask for confirmation before killing]'
    '(- : *)'{-l,--list}'[list all known signal names]'
    '(-n --ns)'{-n,--ns}'[match against the PID namespace of the given PID]:pid: _pids'
    '(-o --older-than)'{-o,--older-than}'[match only processes older than the specified time]:time:->time'
    '(-q --quiet)'{-q,--quiet}'[do not complain if no processes were killed]'
    '(-r --regexp)'{-r,--regexp}'[interpret process name as extended regular expression]'
    '(-s --signal)'{-s,--signal}'[send the speified signal]:signal:_signals'
    '(-u --user)'{-u,--user}'[kill only processes owned by specified user]: : _users'
    '(-v --verbose)'{-v,--verbose}'[report if the signal was successfully sent]'
    '(-w --wait)'{-w,--wait}'[wait for all killed processes to die]'
    '(- : *)'{-V,--version}'[display version information]'
    '(-y --younger-than)'{-y,--younger-than}'[match only processes younger than the specified time]:time:->time'
    "1: : _alternative 'signals: :_signals -p' 'processes-names: :_process_names $opts'"
    "*: :_process_names $opts"
  )
  [[ $CURRENT = 2 || ( $CURRENT = 3 && $words[2] = (-Z|--context) ) ]] && \
    args+=( '(-Z --context)'{-Z,--context}'[specify SELinux security context]:regex pattern: ' )

  _arguments -s -S -C : $args && ret=0

  case $state in
    (time)
      local -a units=( 's:seconds' 'm:minuts' 'h:hours' 'd:days'
			'w:weeks' 'M:months' 'y:years' )
      if compset -P '[0-9]##(|.[0-9]#)'; then
	_alternative 'float-number:: _message "float number"' \
		    'unit:: _describe unit units' && ret=0
      else
	_message 'float number and unit' && ret=0
      fi
      ;;
  esac

  return ret

else # bsd and darwin

  if [[ $OSTYPE == (freebsd|dragonfly)* ]]; then
    args=( '-j[kill processes in specified jail]: :_jails -0' )
    opts+=( -t )  # long process names must be truncated
  fi
  args+=(
    '-v[be more verbose about what will be done]'
    '-e[use effective user ID for -u option]'
    '(- : *)-help[give a help on command usage and exit]'
    '(- : *)-l[list names of available signals and exit]'
    '-m[interprit specified name as a regular expression]'
    '-s[show only what will be done, but do notsend any signal]'
    '-d[print info about processes matched, but do not send any signal]'
    '-u[limit to processes belonging to specified user]: :_users'
    '-t[limit to processes running on specified tty]: :_ttys -od'
    "-c[with -u or -t, limit to processes matching specified name]: :_process_names $opts"
    '-z[do not skip zombies]'
    "1: : _alternative 'signals::_signals -p' 'processes-names::_process_names $opts'"
    "*: :_process_names $opts"
  )
  _arguments -s -S : $args

fi
debug log:

solving 989772c5d ...
found 989772c5d in https://inbox.vuxu.org/zsh-workers/C3A7A339-300C-4D7A-8F24-5165BB927115@kba.biglobe.ne.jp/
found 375b1bf74 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 375b1bf74e079236b6bcf1f9ddcb42ea7bffb246	Completion/Unix/Command/_killall

applying [1/1] https://inbox.vuxu.org/zsh-workers/C3A7A339-300C-4D7A-8F24-5165BB927115@kba.biglobe.ne.jp/
diff --git a/Completion/Unix/Command/_killall b/Completion/Unix/Command/_killall
index 375b1bf74..989772c5d 100644

Checking patch Completion/Unix/Command/_killall...
Applied patch Completion/Unix/Command/_killall cleanly.

index at:
100644 989772c5d7f7315125c9e989ae77c40b7a220e6d	Completion/Unix/Command/_killall

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