daandemeyer / rpms / systemd

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