fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerPrepare to not localize private function descriptionsd835c5252

master
6.0 KiB83 linesraw
1# localization: tier3
2function __fish_complete_netcat
3    set -l nc $argv[1]
4    set -l flavor $argv[-1]
5
6    switch $flavor
7        case busybox
8            complete -c $nc -s l -d "Listen mode, for inbound connects"
9            complete -c $nc -s p -x -d "Local port"
10            complete -c $nc -s w -x -d "Connect timeout"
11            complete -c $nc -s i -x -d "Delay interval for lines sent"
12            complete -c $nc -s f -r -d "Use file (ala /dev/ttyS0) instead of network"
13            complete -c $nc -s e -r -d "Run PROG after connect"
14
15        case ncat
16            complete -c $nc -w ncat
17
18        case nc.openbsd
19            complete -c $nc -s 4 -d "Forces nc to use IPv4 addresses only"
20            complete -c $nc -s 6 -d "Forces nc to use IPv6 addresses only"
21            complete -c $nc -s b -d "Allow broadcast"
22            complete -c $nc -s C -d "Send CRLF as line-ending"
23            complete -c $nc -s D -d "Enable debugging on the socket"
24            complete -c $nc -s d -d "Do not attempt to read from stdin"
25            complete -c $nc -s F -d "Pass the first connected socket using sendmsg(2) to stdout and exit"
26            complete -c $nc -s h -d "Prints out nc help"
27            complete -c $nc -s I -x -d "Specifies the size of the TCP receive buffer"
28            complete -c $nc -s i -x -d "Specifies a delay time interval between lines of text sent and received"
29            complete -c $nc -s k -d "Forces nc to stay listening for another connection after its current connection is completed"
30            complete -c $nc -s l -d "Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host"
31            complete -c $nc -s M -x -d "Set the TTL / hop limit of outgoing packets"
32            complete -c $nc -s m -x -d "Ask the kernel to drop incoming packets whose TTL / hop limit is under minttl"
33            complete -c $nc -s N -d "shutdown(2) the network socket after EOF on the input"
34            complete -c $nc -s n -d "Do not do any DNS or service lookups on any specified addresses, hostnames or ports"
35            complete -c $nc -s O -x -d "Specifies the size of the TCP send buffer"
36            complete -c $nc -s P -x -d "Specifies a username to present to a proxy server that requires authentication"
37            complete -c $nc -s p -x -d "Specifies the source port nc should use, subject to privilege restrictions and availability"
38            complete -c $nc -s q -x -d "after EOF on stdin, wait the specified number of seconds and then quit"
39            complete -c $nc -s r -d "Specifies that source and/or destination ports should be chosen randomly instead of sequentially within a range or in the order that the system assigns them"
40            complete -c $nc -s S -d "Enables the RFC 2385 TCP MD5 signature option"
41            complete -c $nc -s s -x -d "Specifies the IP of the interface which is used to send the packets"
42            complete -c $nc -s T -x -a "critical inetcontrol lowcost lowdelay netcontrol throughput reliability ef af cs0 cs1 cs2 cs3 cs4 cs5 cs6 cs7" -d "Change IPv4 TOS value"
43            complete -c $nc -s t -d "Causes nc to send RFC 854 DON'T and WON'T responses to RFC 854 DO and WILL requests"
44            complete -c $nc -s U -d "Specifies to use UNIX-domain sockets"
45            complete -c $nc -s u -d "Use UDP instead of the default option of TCP"
46            complete -c $nc -s V -x -d "Set the routing table to be used"
47            complete -c $nc -s v -d "Have nc give more verbose output"
48            complete -c $nc -s W -x -d "Terminate after receiving recvlimit packets from the network"
49            complete -c $nc -s w -x -d "Connections which cannot be established or are idle timeout after timeout seconds"
50            function __fish_complete_nc-connect-openbsd
51                printf "connect\tHTTPS proxy\n"
52                printf "4\tSOCKS v.4\n"
53                printf "5\tSOCKS v.5\n"
54            end
55            complete -c $nc -s X -x -a "(__fish_complete_nc-connect-openbsd)" -d "Requests that nc should use the specified protocol when talking to the proxy server"
56            complete -c $nc -s x -x -a "(__fish_print_hostnames)" -d "Requests that nc should connect to destination using a proxy at proxy_address and port"
57            complete -c $nc -s Z -d "DCCP mode"
58            complete -c $nc -s z -d "Specifies that nc should just scan for listening daemons, without sending any data to them"
59
60        case nc.traditional '*' # fallback to the most restricted one
61            complete -c $nc -s c -r -d "specify shell commands to exec after connect"
62            complete -c $nc -s e -r -d "specify filename to exec after connect"
63            complete -c $nc -s g -x -d "source-routing hop point[s], up to 8"
64            complete -c $nc -s G -x -d "source-routing pointer: 4, 8, 12, ..."
65            complete -c $nc -s h -d "display help"
66            complete -c $nc -s i -x -d "delay interval for lines sent, ports scanned"
67            complete -c $nc -s l -d "listen mode, for inbound connects"
68            complete -c $nc -s n -d "numeric-only IP addresses, no DNS"
69            complete -c $nc -s o -r -d "hex dump of traffic"
70            complete -c $nc -s p -x -d "local port number (port numbers can be individual or ranges: lo-hi [inclusive])"
71            complete -c $nc -s q -x -d "after EOF on stdin, wait the specified number of seconds and then quit"
72            complete -c $nc -s b -d "allow UDP broadcasts"
73            complete -c $nc -s r -d "randomize local and remote ports"
74            complete -c $nc -s s -x -d "local source address"
75            complete -c $nc -s t -d "enable telnet negotiation"
76            complete -c $nc -s u -d "UDP mode"
77            complete -c $nc -s v -d "verbose [use twice to be more verbose]"
78            complete -c $nc -s w -x -d "timeout for connects and final net reads"
79            complete -c $nc -s C -d "Send CRLF as line-ending"
80            complete -c $nc -s z -d "zero-I/O mode [used for scanning]"
81            complete -c $nc -s T -x -a "Minimize-Delay Maximize-Throughput Maximize-Reliability Minimize-Cost" -x -d "set TOS flag"
82    end
83end