shell-completion: add hostnamectl set-deployment
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Jul 2014 13:08:47 +0000 (09:08 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Jul 2014 13:22:01 +0000 (09:22 -0400)
shell-completion/bash/hostnamectl
shell-completion/zsh/_hostnamectl

index 22f8f06..a5e3460 100644 (file)
@@ -38,7 +38,7 @@ _hostnamectl() {
         local -A VERBS=(
                 [STANDALONE]='status'
                      [ICONS]='set-icon-name'
-                      [NAME]='set-hostname'
+                      [NAME]='set-hostname set-deployment'
                    [CHASSIS]='set-chassis'
         )
 
index be86876..e02f6de 100644 (file)
@@ -25,6 +25,14 @@ _hostnamectl_set-chassis() {
     fi
 }
 
+_hostnamectl_set-deployment() {
+    if (( CURRENT <= 3 )); then
+        _message "new environment"
+    else
+        _message "no more options"
+    fi
+}
+
 _hostnamectl_command() {
     local -a _hostnamectl_cmds
     _hostnamectl_cmds=(
@@ -32,6 +40,7 @@ _hostnamectl_command() {
         "set-hostname:Set system hostname"
         "set-icon-name:Set icon name for host"
         "set-chassis:Set chassis type for host"
+        "set-deployment:Set deployment environment"
     )
     if (( CURRENT == 1 )); then
         _describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@"