hostnamectl: document JSON status object output

status with --static, --pretty, or --transient prints only the
selected hostname in regular output. JSON status output is built from
hostnamed's Describe data and remains a full status object.

Document this distinction so callers do not expect the name type
switches to turn JSON status into a single scalar value.

Follow-up for: ac8a4f6b78
This commit is contained in:
dongshengyuan
2026-07-22 17:23:16 +08:00
committed by Yu Watanabe
parent 765dc96746
commit eb4abd2d14

View File

@@ -219,6 +219,9 @@
<listitem><para>If <command>status</command> is invoked (or no explicit command is given) and one of these
switches is specified, <command>hostnamectl</command> will print out just this selected hostname.</para>
<para>This selection does not apply to JSON output: with <option>--json=</option>,
<command>status</command> always prints the full status object.</para>
<para>If used with <command>hostname</command>, only the selected hostnames will be updated. When more
than one of these switches are specified, all the specified hostnames will be updated. </para>