zsh-workers
 help / color / mirror / code / Atom feed
1b11ba473a728fef0991bac9098c70703fda8421 blob 763 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
 
#compdef sockstat
local -a args

case $OSTYPE in
  *bsd*)
    args=(
      '-4[show AF_INET (IPv4) sockets]'
      '-6[show AF_INET6 (IPv6) sockets]'
      '-c[show connected sockets]'
      '-l[show listening sockets]'
      '*-p[specify port number]:port numbers (comma delimited)'
      '-u[show AF_LOCAL (UNIX) sockets]'
    )
  ;|
  freebsd*)
    args+=(
      '*-j[show sockets belonging to JID]: : _jails -0 -o jid'
      '-L[exclude loopback]'
      '*-P[specify protocol]: :_sequence -s , _ports'
    )
  ;;
  netbsd*)
    args+=(
      '*-f[only show specified address family]:address family:(inet inet6 local unix)'
      '-n[no symbolic names for addresses/ports]'
    )
  ;;
esac

if (( $#args )); then
  _arguments -s -w $args
  return
fi

_default
debug log:

solving 1b11ba4 ...
found 1b11ba4 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).