zsh-workers
 help / color / mirror / code / Atom feed
4e4006b306b8f1759420f3d5b3991c3753ff7c4b blob 1269 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
 
#compdef nc netcat

# handle name clash with the nedit client
if [[ $service = nc ]] && ! _pick_variant netcat=connect nedit -h; then
  _nedit
  return
fi

if (( ! $+_nc_args )); then
  local help="$(_call_program options $words[1] -h < /dev/null 2>&1)"
  local -A optionmap
  optionmap=(
    '*-e prog*' '-e+[program to exec after connect]:prog:_command_names -e'
     '*-g gateway*' '-g+[source-routing hop point]:gateway:_hosts'
     '*-G num*' '-G[source-routing pointer: 4, 8, 12]'
     '*-i secs*' '-i+[delay interval for lines sent or ports scanned]:delay (secs)'
     '*-l*' '-l[listen mode]'
     '*-n*' '-n[numeric-only IP addresses, no DNS]'
     '*-o file*' '-o+[hex dump of traffic]:file:_files'
     '*-p port*' '-p+[local port number]:port:_ports'
     '*-r*' '-r[randomize local and remote ports]'
     '*-q secs*' '-q+[quit after EOF on stdin and delay of secs]:delay (secs)'
     '*-t*' '-t[answer TELNET negotiation]'
     '*-u*' '-u[UDP mode]'
     '*-v*' '-v[verbose]'
     '*-w secs*' '-w+[timeout for connects and final net reads]:timeout (secs)'
     '*-z*' '-z[zero-I/O mode]'
     '*-x*' '-x'
     '*-b*' '-b[allow broadcasts]'
  )
  _nc_args=($optionmap[(K)"$help"])
fi

_arguments -s \
  "$_nc_args[@]" \
  ':host:_hosts' \
  ':port:_ports'
debug log:

solving 4e4006b30 ...
found 4e4006b30 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).