fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
fb314b28f
master
1function __fish_complete_tcpdump_interfaces --description"Complete network interfaces available on the system and on which tcpdump can capture packets" 2tcpdump --list-interfaces2> /dev/null| string replace -r'\d+\.(\S+( \(.*\))?).*' '$1' | string replace -r' \((.*)\)' '\t$1' 3end 4 5complete -c tcpdump -f 6complete -c tcpdump -s A -d'Print each packet in ASCII' 7complete -c tcpdump -s b -d'Print the AS number in BGP packets in ASDOT notation' 8complete -c tcpdump -s B -l buffer-size -x -d'Set the operating system capture buffer size (in KiB)' 9complete -c tcpdump -s c -x -d'Exit after receiving count packets' 10complete -c tcpdump -l count -d'Print only packet count when reading capture files' 11complete -c tcpdump -s C -x -d'Maximum size per savefile (in MB)' 12complete -c tcpdump -s d -d'Dump the compiled packet-matching code in a human readable form' 13complete -c tcpdump -o dd -d'Dump packet-matching code as a C program fragment' 14complete -c tcpdump -o ddd -d'Dump packet-matching code as decimal numbers' 15complete -c tcpdump -s D -l list-interfaces -d'Print the list of the network interfaces' 16complete -c tcpdump -s e -d'Print the link-level header on each dump line' 17complete -c tcpdump -s E -x -d'Set options for decrypting IPsec ESP packets' 18complete -c tcpdump -s f -d'Print foreign IPv4 addresses numerically' 19complete -c tcpdump -s F -rF -d'Use file as input for the filter expression' 20complete -c tcpdump -s G -x -d'Rotate the dump file every rotate_seconds seconds' 21complete -c tcpdump -s h -l help -d'Print version strings and a usage message' 22complete -c tcpdump -l version -d'Print the tcpdump and libpcap version strings' 23complete -c tcpdump -s H -d'Attempt to detect 802.11s draft mesh headers' 24complete -c tcpdump -s i -l interface -x -a"(__fish_complete_tcpdump_interfaces)" 25complete -c tcpdump -s I -l monitor-mode -d'Put the interface in monitor mode' 26complete -c tcpdump -l immediate-mode -d'Capture in immediate mode' 27complete -c tcpdump -s j -l time-stamp-type -x -a'host host_lowprec host_hiprec adapter adapter_unsynced' -d'Set the time stamp type for the capture' 28complete -c tcpdump -s J -l list-time-stamp-types -d'List the supported time stamp types for the interface' 29complete -c tcpdump -l time-stamp-precision -x -a'micro nano' -d'Set the time stamp precision for the capture' 30complete -c tcpdump -l micro -d'Set time stamp precision to microseconds' 31complete -c tcpdump -l nano -d'Set time stamp precision to nanoseconds' 32complete -c tcpdump -s K -l dont-verify-checksums -d'Don\'t attempt to verify IP, TCP, or UDP checksums' 33complete -c tcpdump -s l -d'Make stdout line buffered' 34complete -c tcpdump -s L -l list-data-link-types -d'List the known data link types for the interface' 35complete -c tcpdump -s m -rF -d'Load SMI MIB module definitions from file' 36complete -c tcpdump -s M -x -d'Use a shared secret for validating digests with the TCP-MD5 option' 37complete -c tcpdump -s n -d'Don\'t convert host addresses to names' 38complete -c tcpdump -o nn -d'Don\'t convert protocol and port numbers etc. to names either' 39complete -c tcpdump -s N -d'Don\'t print domain name qualification of host names' 40complete -c tcpdump -s\# -l number -d'Print an optional packet number' 41complete -c tcpdump -s O -l no-optimize -d'Do not run the packet-matching code optimizer' 42complete -c tcpdump -s p -l no-promiscuous-mode -d'Don\'t put the interface into promiscuous mode' 43complete -c tcpdump -l print -d'Print parsed packet output' 44complete -c tcpdump -s Q -l direction -x -a'in out inout' -d'Choose direction for which packets should be captured' 45complete -c tcpdump -s q -d'Print less protocol information' 46complete -c tcpdump -s r -rF -d'Read packets from file' 47complete -c tcpdump -s S -l absolute-tcp-sequence-numbers -d'Print absolute TCP sequence numbers' 48complete -c tcpdump -s s -l snapshot-length -x -d'Snarf snaplen bytes of data from each packet' 49complete -c tcpdump -s T -x -d'Force packets to be interpreted the specified type' 50complete -c tcpdump -s t -d'Don\'t print a timestamp on each dump line' 51complete -c tcpdump -o tt -d'Print timestamp as seconds and fractions of a second since epoch' 52complete -c tcpdump -o ttt -d'Print a delta between current and previous line' 53complete -c tcpdump -o tttt -d'Print timestamp as hours, minutes, seconds, and fractions of a second since midnight' 54complete -c tcpdump -o ttttt -d'Print a delta between current and first line' 55complete -c tcpdump -s u -d'Print undecoded NFS handles' 56complete -c tcpdump -s U -l packet-buffered -d'Make the packet output packet-buffered' 57complete -c tcpdump -s v -d'Produce (slightly more) verbose output' 58complete -c tcpdump -o vv -d'Even more verbose output' 59complete -c tcpdump -o vvv -d'Even more verbose output' 60complete -c tcpdump -s V -rF -d'Read a list of filenames from file' 61complete -c tcpdump -s w -rF -d'Write the raw packets to file' 62complete -c tcpdump -s W -d'Limit the number of files created' 63complete -c tcpdump -s x -d'Print the data of each packet in hex (minus link level header)' 64complete -c tcpdump -o xx -d'Print the data of each packet in hex (including link level header)' 65complete -c tcpdump -s X -d'Print the data of each packet in hex and ASCII (minus link level header)' 66complete -c tcpdump -o XX -d'Print the data of each packet in hex and ASCII (including link level header)' 67complete -c tcpdump -s y -l linktype -x -d'Set the data link type to use while capturing packets' 68complete -c tcpdump -s z -x -d'Make tcpdump run "postrotate-command file"' 69complete -c tcpdump -s Z -l relinquish-privileges -x -a"(__fish_print_users)" -d'Change user ID before opening any savefiles for output'