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