hostnamectl: add support for tagging the machine

This commit is contained in:
Lennart Poettering
2026-05-21 18:30:16 +02:00
parent 290a417699
commit 71eac88e5f
4 changed files with 113 additions and 2 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ _hostnamectl() {
local -A VERBS=(
[STANDALONE]='status'
[ICONS]='icon-name'
[NAME]='hostname deployment location'
[NAME]='hostname deployment location tags'
[CHASSIS]='chassis'
)
+6
View File
@@ -47,6 +47,11 @@ _hostnamectl_location() {
fi
}
(( $+functions[_hostnamectl_tags] )) ||
_hostnamectl_tags() {
_message "machine tag"
}
(( $+functions[_hostnamectl_commands] )) ||
_hostnamectl_commands() {
local -a _hostnamectl_cmds
@@ -57,6 +62,7 @@ _hostnamectl_commands() {
"chassis:Get/set chassis type for host"
"deployment:Get/set deployment environment for host"
"location:Get/set location for host"
"tags:Get/set machine tags for host"
)
if (( CURRENT == 1 )); then
_describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@"