daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
803fb7
From 2cfba1646374d8d10431d0bd647b734ad4f59a49 Mon Sep 17 00:00:00 2001
803fb7
From: Ronny Chevalier <chevalier.ronny@gmail.com>
803fb7
Date: Tue, 7 Apr 2015 20:14:28 +0200
803fb7
Subject: [PATCH] zsh-completion: update hostnamectl
803fb7
803fb7
(cherry picked from commit d67b1f525f488e5dfc076972cccf2a6411257fb8)
803fb7
803fb7
Cherry-picked from: c5b43a4
803fb7
Resolves: #1222517
803fb7
---
803fb7
 shell-completion/zsh/_hostnamectl | 12 +++++++++++-
803fb7
 1 file changed, 11 insertions(+), 1 deletion(-)
803fb7
803fb7
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
803fb7
index a7217a199..7528e0649 100644
803fb7
--- a/shell-completion/zsh/_hostnamectl
803fb7
+++ b/shell-completion/zsh/_hostnamectl
803fb7
@@ -33,6 +33,14 @@ _hostnamectl_set-deployment() {
803fb7
     fi
803fb7
 }
803fb7
 
803fb7
+_hostnamectl_set-location() {
803fb7
+    if (( CURRENT <= 3 )); then
803fb7
+        _message "new location"
803fb7
+    else
803fb7
+        _message "no more options"
803fb7
+    fi
803fb7
+}
803fb7
+
803fb7
 _hostnamectl_command() {
803fb7
     local -a _hostnamectl_cmds
803fb7
     _hostnamectl_cmds=(
803fb7
@@ -40,7 +48,8 @@ _hostnamectl_command() {
803fb7
         "set-hostname:Set system hostname"
803fb7
         "set-icon-name:Set icon name for host"
803fb7
         "set-chassis:Set chassis type for host"
803fb7
-        "set-deployment:Set deployment environment"
803fb7
+        "set-deployment:Set deployment environment for host"
803fb7
+        "set-location:Set location for host"
803fb7
     )
803fb7
     if (( CURRENT == 1 )); then
803fb7
         _describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@"
803fb7
@@ -67,4 +76,5 @@ _arguments -s \
803fb7
     '--pretty[Only set pretty hostname]' \
803fb7
     '--no-ask-password[Do not prompt for password]' \
803fb7
     {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
803fb7
+    {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
803fb7
     '*::hostnamectl commands:_hostnamectl_command'