mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
hostnamectl: add -j switch for quick json output
We already support -j as shortcut for JSON mode in various tools. Let's add one more. We probably should add this systematically (at least where it doesn't conflict with an existing -j switch with other purpose). But I am too lazy to add that now.
This commit is contained in:
@@ -35,7 +35,7 @@ _hostnamectl() {
|
||||
local i verb comps
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version --transient --static --pretty --no-ask-password'
|
||||
[STANDALONE]='-h --help --version --transient --static --pretty --no-ask-password -j'
|
||||
[ARG]='-H --host -M --machine --json'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user