Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: update networkmanager completion
- X-seq: zsh-workers 52268
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: update networkmanager completion
- Date: Thu, 02 Nov 2023 16:23:21 +0100
- Archived-at: <https://zsh.org/workers/52268>
- List-id: <zsh-workers.zsh.org>
This is an update for nmcli completion for networkmanager 1.42.2.
Oliver
diff --git a/Completion/Linux/Command/_networkmanager b/Completion/Linux/Command/_networkmanager
index 1e05252b2..d44c313db 100644
--- a/Completion/Linux/Command/_networkmanager
+++ b/Completion/Linux/Command/_networkmanager
@@ -42,8 +42,24 @@ _nm_fields() {
}
_nm_general() {
- _arguments "1:command:(status hostname permissions logging help)"
- # TODO: provide completions for logging
+ local curcontext="$curcontext" state line
+ _arguments "1:command:(status hostname permissions logging reload help)" \
+ "*::arguments:->args"
+
+ case $line[1] in
+ l*)
+ _values -w -S ' ' values \
+ 'level:level' \
+ 'domains:domain'
+ ;;
+ r*)
+ _describe -t flags 'flag' '(
+ "conf:NetworkManager.conf configuration"
+ "dns-rc:update DNS configuration"
+ "dns-full:restart the DNS plugin"
+ )'
+ ;;
+ esac
}
_nm_networking() {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author