]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/zsh/_hostnamectl
improve zsh completion (#32098)
[thirdparty/systemd.git] / shell-completion / zsh / _hostnamectl
index bdd26b10f1ebb56db5847d5e5bd99160f0523b0f..76473937a0040e9ee74d810131880bf8f180829f 100644 (file)
@@ -83,13 +83,13 @@ _hostnamectl_commands() {
 }
 
 _arguments -s \
-    {-h,--help}'[Show this help]' \
-    '--version[Show package version]' \
+    '(- *)'{-h,--help}'[Show this help]' \
+    '(- *)--version[Show package version]' \
     '--transient[Only set transient hostname]' \
     '--static[Only set static hostname]' \
     '--pretty[Only set pretty hostname]' \
     '--no-ask-password[Do not prompt for password]' \
-    {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
-    {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
-    '--json[Shows output formatted as JSON]:format:_hostnamectl_get_json' \
+    '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
+    '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
+    '--json=[Shows output formatted as JSON]:format:_hostnamectl_get_json' \
     '*::hostnamectl commands:_hostnamectl_commands'