fork/fish-shell

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

ccoVeilleFix typos in completions scripts0df6fa791

master
3.7 KiB59 linesraw
1set -l arping_version $(arping -V 2>&1)
2
3if string match -eiq -- iputils $arping_version
4    # this is for arping from iputils
5    # https://github.com/iputils/iputils
6    complete -c arping -xa "(__fish_print_hostnames)"
7    complete -c arping -s A -d "Unsolicited ARP mode (ARP REPLY)"
8    complete -c arping -s b -d "Send only MAC level broadcasts"
9    complete -c arping -s c -x -d "Stop after number of packets"
10    complete -c arping -s D -d "Duplicate address detection mode"
11    complete -c arping -s f -d "Finish after the first reply"
12    complete -c arping -s I -xa "(__fish_print_interfaces)" -d "Network device where to send packets"
13    complete -c arping -s h -d "Print help page"
14    complete -c arping -s q -d "Quiet output"
15    complete -c arping -s s -xa "(__fish_print_addresses | grep -v :)" -d "IP source address to use in ARP packets"
16    complete -c arping -s U -d "Unsolicited ARP mode (ARP REQUEST)"
17    complete -c arping -s V -d "Print version"
18    complete -c arping -s w -x -d "Specify a timeout (seconds)"
19    complete -c arping -s i -x -d "Specify an interval between packets (seconds)"
20
21else if string match -eiq -- habets $arping_version
22    # this is for arping from Thomas Habets
23    # https://github.com/ThomasHabets/arping
24    complete -c arping -xa "(__fish_print_hostnames)"
25    complete -c arping -l help -d "Show extended help"
26    complete -c arping -s 0 -d "Ping with source IP address 0.0.0.0"
27    complete -c arping -s a -d "Audible ping"
28    complete -c arping -s A -d "Only count addresses matching requested address"
29    complete -c arping -s b -d "Ping with source IP address 255.255.255.255"
30    complete -c arping -s B -d "Use instead of host if you want to address 255.255.255.255"
31    complete -c arping -s c -x -d "Only send count requests"
32    complete -c arping -s C -x -d "Only wait for count replies"
33    complete -c arping -s d -d "Find duplicate replies"
34    complete -c arping -s D -d "Display answers as exclamation points and missing packets as dots"
35    complete -c arping -s e -d "Audible ping, but beep when there is no reply"
36    complete -c arping -s F -d "Don't try to be smart about the interface name"
37    complete -c arping -s f -xa "(__fish_print_groups)" -d "setgid() to this group instead of the nobody group"
38    complete -c arping -s h -d "Displays a help message"
39    complete -c arping -s i -xa "(__fish_print_interfaces)" -d "Use the specified interface"
40    complete -c arping -s m -x -d "Type of timestamp to use for incoming packets"
41    complete -c arping -s p -d "Turn on promiscuous mode on interface"
42    complete -c arping -s P -d "Send ARP replies instead of requests"
43    complete -c arping -s q -d "Do not display messages, except errors"
44    complete -c arping -s Q -x -d "802.1p priority to set"
45    complete -c arping -s r -d "Raw output: only the MAC/IP address is displayed"
46    complete -c arping -s R -d "Raw output: Like -r but shows the other one"
47    complete -c arping -s s -x -d "Set source MAC address"
48    complete -c arping -s S -xa "(__fish_print_addresses | grep -v :)" -d "Ping with this source IP address"
49    complete -c arping -s t -x -d "Set target MAC address"
50    complete -c arping -s T -x -d "Set target address when pinging MACs that won't respond to broadcasts"
51    complete -c arping -s u -d "Show index=received/sent"
52    complete -c arping -s U -d "Send unsolicited ARP"
53    complete -c arping -s v -d "Verbose output"
54    complete -c arping -s V -x -d "VLAN tag to set"
55    complete -c arping -s w -x -d "Timeout before ping exits (seconds)"
56    complete -c arping -s W -x -d "Time to wait between pings (seconds)"
57    complete -c arping -s z -d "Enable seccomp"
58    complete -c arping -s z -d "Disable seccomp"
59end