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