summaryrefslogtreecommitdiff
path: root/Completion/Linux/Command/_networkmanager
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
commitbfc5d42735c1660263904ec5254cccf539a0a458 (patch)
tree9bbb81b4a53941427e6f9e65ae55027d9108df8c /Completion/Linux/Command/_networkmanager
parent74561cc51b8867e43cb2937ab2edfb36e2a829bf (diff)
parent643de931640e01aa246723d2038328ef33737965 (diff)
downloadzsh-bfc5d42735c1660263904ec5254cccf539a0a458.tar.gz
zsh-bfc5d42735c1660263904ec5254cccf539a0a458.zip
Merge tag 'zsh-5.7.1-test-3' into debian
Test release: 5.7.1-test-3
Diffstat (limited to 'Completion/Linux/Command/_networkmanager')
-rw-r--r--Completion/Linux/Command/_networkmanager20
1 files changed, 17 insertions, 3 deletions
diff --git a/Completion/Linux/Command/_networkmanager b/Completion/Linux/Command/_networkmanager
index fa9301971..c9b09d145 100644
--- a/Completion/Linux/Command/_networkmanager
+++ b/Completion/Linux/Command/_networkmanager
@@ -4,6 +4,7 @@
_networkmanager() {
local curcontext="$curcontext" state line
+ local nmcli="$words[1]"
_arguments -C \
'(-o -overview)-o'{,verview}'[overview mode (hide default values)]' \
@@ -107,10 +108,22 @@ _nm_connection_down() {
}
_nm_connection_modify() {
- # TODO: add support for options and properties
- _arguments \
+ local curcontext="$curcontext" ret=1
+ local -a state line expl properties
+
+ _arguments -A "-*" \
"--temporary" \
- "1:connection:_nm_connection_specs"
+ "1:connection:_nm_connection_specs" \
+ '2:option:->properties' \
+ '3:value' && ret=0
+
+ if [[ -n "$state" ]]; then
+ properties=( ${${(f)"$(_call_program properties $nmcli -t connection show $line[1])"}%%:*} )
+ _description properties expl property
+ _multi_parts "$expl[@]" . properties && ret=0
+ fi
+
+ return ret
}
_nm_connection_clone() {
@@ -245,6 +258,7 @@ _nm_device_wifi() {
_nm_device_wifi_list() {
# TODO: support bssid on its own
_arguments \
+ '--rescan[force or disable network scan]:network scan:(yes no auto)' \
"1: :(ifname)" \
"2:interface:_nm_device_ifnames" \
"3: :(bssid)" \