fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
9116c6173
master
1set -l nmoutput'(nmcli -g NAME connection show --active 2>/dev/null)' 2set -l cname" $nmoutput "\t"Active connection" 3set -a cname'(nmcli -g NAME connection show 2>/dev/null)\t"Connection"' 4set -l ifname'(nmcli -g DEVICE device status 2>/dev/null)\t"Interface name"' 5set -l ssid'(nmcli -g SSID device wifi list 2>/dev/null)\t"SSID"' 6set -l bssid'(nmcli -g BSSID device wifi list 2>/dev/null | string replace --all \\\ "")\t"BSSID"' 7 8set -l nmcli_commands general networking radio connection device agent monitor help 9set -l nmcli_general status hostname permissions logging help 10set -l nmcli_networking on off connectivity help 11set -l nmcli_radio all wifi wwan help 12set -l nmcli_connection show up down add modify clone edit delete monitor reload load import export help 13set -l nmcli_device status show set connect reapply modify disconnect delete monitor wifi lldp help 14set -l nmcli_agent secret polkit all help 15 16complete -c nmcli -s t -l terse -d'Output is terse' -n"not __fish_seen_subcommand_from $nmcli_commands " 17complete -c nmcli -s p -l pretty -d'Output is pretty' -n"not __fish_seen_subcommand_from $nmcli_commands " 18complete -c nmcli -s m -l mode -d'Switch between tabular and multiline mode' -xa'tabular multiline' -n"not __fish_seen_subcommand_from $nmcli_commands " 19complete -c nmcli -s c -l color -d'Whether to use colors in output' -xa'auto yes no' -n"not __fish_seen_subcommand_from $nmcli_commands " 20complete -c nmcli -s f -l fields -d'Specify the output fields' -xa'all common' -n"not __fish_seen_subcommand_from $nmcli_commands " 21complete -c nmcli -s e -l escape -d'Whether to escape ":" and "\\" characters' -xa'yes no' -n"not __fish_seen_subcommand_from $nmcli_commands " 22complete -c nmcli -s a -l ask -d'Ask for missing parameters' -n"not __fish_seen_subcommand_from $nmcli_commands " 23complete -c nmcli -s s -l show-secrets -d'Allow displaying passwords' -n"not __fish_seen_subcommand_from $nmcli_commands " 24complete -c nmcli -s w -l wait -d'Set timeout (seconds) waiting for finishing operations' -x -n"not __fish_seen_subcommand_from $nmcli_commands " 25complete -c nmcli -s v -l version -d'Show nmcli version' -x -n"not __fish_seen_subcommand_from $nmcli_commands " 26complete -c nmcli -s h -l help -d'Print help information' -x 27complete -c nmcli -d'Command-line tool to control NetworkManager' 28 29complete -c nmcli -n"not __fish_seen_subcommand_from $nmcli_commands " -xa" $nmcli_commands " 30 31complete -c nmcli -n"__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general " -xa status -d'Show overall status of NetworkManager' 32complete -c nmcli -n"__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general " -xa hostname -d'Get or change persistent system hostname' 33complete -c nmcli -n"__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general " -xa permissions -d'Show caller permissions for authenticated operations' 34complete -c nmcli -n"__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general " -xa logging -d'Get or change NetworkManager logging level and domains' 35complete -c nmcli -n"__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general " -xa help 36complete -c nmcli -n"contains_seq general logging -- (commandline -xp)" -xa'level domains help' 37 38complete -c nmcli -n"__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking " -xa on -d'Switch networking on' 39complete -c nmcli -n"__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking " -xa off -d'Switch networking off' 40complete -c nmcli -n"__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking " -xa connectivity -d'Get network connectivity state' 41complete -c nmcli -n"__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking " -xa help 42complete -c nmcli -n"contains_seq networking connectivity -- (commandline -xp)" -xa check -d'Re-check the connectivity' 43 44complete -c nmcli -n"__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio " -xa all -d'Get status of all radio switches; turn them on/off' 45complete -c nmcli -n"contains_seq radio all -- (commandline -xp)" -xa'on off help' 46complete -c nmcli -n"__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio " -xa wifi -d'Get status of Wi-Fi radio switch; turn it on/off' 47complete -c nmcli -n"contains_seq radio wifi -- (commandline -xp)" -xa'on off help' 48complete -c nmcli -n"__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio " -xa wwan -d'Get status of mobile broadband radio switch; turn it on/off' 49complete -c nmcli -n"contains_seq radio wwan -- (commandline -xp)" -xa'on off help' 50 51complete -c nmcli -n"__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection " -xa" $nmcli_connection " 52# Connection subcommands are self-explanatory, I'm just highlighting a difference between edit and modify 53complete -c nmcli -n"__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection " -xa modify -d"Modify one or more properties" 54complete -c nmcli -n"__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection " -xa edit -d"Interactive edit" 55complete -c nmcli -n"contains_seq connection show -- (commandline -xp)" -l active -d'List only active profiles' 56complete -c nmcli -n"contains_seq connection show -- (commandline -xp)" -l order -d'Custom connection ordering' 57complete -c nmcli -n"contains_seq connection show -- (commandline -xp)" -xa"help $cname " -k 58complete -c nmcli -n"contains_seq connection up -- (commandline -xp) && not contains -- (commandline -xp)[-1] ifname ap" -xa"help $cname " -k 59complete -c nmcli -n"contains_seq connection up -- (commandline -xp) && test (commandline -xp)[-1] = ifname" -xa" $ifname " -k 60complete -c nmcli -n"contains_seq connection up -- (commandline -xp) && test (commandline -xp)[-1] = ap" -xa" $bssid " 61complete -c nmcli -n"contains_seq connection up -- (commandline -xp)" -xa nsp -d'Specify NSP to connect to (only for WiMAX)' 62complete -c nmcli -n"contains_seq connection up -- (commandline -xp)" -xa passwd-file -d'password file to activate the connection' 63complete -c nmcli -n"contains_seq connection down -- (commandline -xp)" -xa"help $cname " -k 64complete -c nmcli -n"contains_seq connection add -- (commandline -xp)" -xa'type ifname con-name autoconnect save master slave-type help' 65complete -c nmcli -n"contains_seq connection add -- (commandline -xp) && test (commandline -xp)[-1] = ifname" -xa" $ifname " 66complete -c nmcli -n"contains_seq connection modify -- (commandline -xp)" -l temporary 67complete -c nmcli -n"contains_seq connection modify -- (commandline -xp)" -xa"help $cname " -k 68complete -c nmcli -n"contains_seq connection clone -- (commandline -xp)" -l temporary 69complete -c nmcli -n"contains_seq connection clone -- (commandline -xp)" -xa"help $cname " -k 70complete -c nmcli -n"contains_seq connection edit -- (commandline -xp)" -xa"type help $cname " -k 71complete -c nmcli -n"contains_seq connection edit type -- (commandline -xp)" -xa con-name 72complete -c nmcli -n"contains_seq connection delete -- (commandline -xp)" -xa"help $cname " -k 73complete -c nmcli -n"contains_seq connection monitor -- (commandline -xp)" -xa"help $cname " -k 74complete -c nmcli -n"contains_seq connection import -- (commandline -xp)" -l temporary 75complete -c nmcli -n"contains_seq connection import -- (commandline -xp)" -xa'type file help' 76complete -c nmcli -n"contains_seq connection export -- (commandline -xp)" -xa"help $cname " -k 77 78set -l wifi_commands list connect hotspot rescan help 79complete -c nmcli -n"__fish_seen_subcommand_from device; and not __fish_seen_subcommand_from $nmcli_device " -xa" $nmcli_device " 80complete -c nmcli -n"contains_seq device set -- (commandline -xp)" -xa'ifname autoconnect managed' 81complete -c nmcli -n"contains_seq device wifi -- (commandline -xp); and not __fish_seen_subcommand_from $wifi_commands " -xa" $wifi_commands " 82complete -c nmcli -n"contains_seq device wifi list -- (commandline -xp)" -xa'ifname bssid' 83complete -c nmcli -n"contains_seq device wifi list ifname -- (commandline -xp)" -xa" $ifname " 84complete -c nmcli -n"contains_seq device wifi list bssid -- (commandline -xp)" -xa" $bssid " 85complete -c nmcli -n"contains_seq device wifi connect -- (commandline -xp)" -xa" $ssid $bssid password wep-key-type ifname bssid name private hidden" -k 86complete -c nmcli -n"contains_seq device wifi connect ifname -- (commandline -xp)" -xa" $ifname " 87complete -c nmcli -n"contains_seq device wifi connect bssid -- (commandline -xp)" -xa" $bssid " 88complete -c nmcli -n"contains_seq device wifi hotspot -- (commandline -xp)" -xa'ifname con-name ssid band channel password' 89complete -c nmcli -n"contains_seq device wifi hotspot ifname -- (commandline -xp)" -xa" $ifname " 90complete -c nmcli -n"contains_seq device wifi rescan -- (commandline -xp)" -xa'ifname ssid' 91complete -c nmcli -n"contains_seq device wifi rescan ifname -- (commandline -xp)" -xa" $ifname " 92complete -c nmcli -n"contains_seq device wifi rescan ssid -- (commandline -xp)" -xa" $ssid " 93complete -c nmcli -n"contains_seq device lldp -- (commandline -xp)" -xa list 94 95complete -c nmcli -n"__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent " -xa secret -d"Register nmcli as NM secret agent" 96complete -c nmcli -n"__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent " -xa polkit -d"Register nmcli as a polkit agent for user session" 97complete -c nmcli -n"__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent " -xa all -d"Run nmcli as secret and polkit agent"