chiark / gitweb /
man: add the same command sections to the man page as the --help text shows
[elogind.git] / man / loginctl.xml
index eb4a2fd77a1e9f849f20df96571357bd64feaf1c..7a6cc156d365faeecccbf1b6d50175a9a0c9f303 100644 (file)
@@ -21,7 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="loginctl" conditional='ENABLE_LOGIND'>
+<refentry id="loginctl" conditional='ENABLE_LOGIND'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
         <refentryinfo>
                 <title>loginctl</title>
 
                 <variablelist>
                         <varlistentry>
-                                <term><option>-h</option></term>
-                                <term><option>--help</option></term>
+                                <term><option>--no-legend</option></term>
 
-                                <listitem><para>Prints a short help
-                                text and exits.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--version</option></term>
-
-                                <listitem><para>Prints a short version
-                                string and exits.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--no-pager</option></term>
-
-                                <listitem><para>Do not pipe output into a
-                                pager.</para></listitem>
+                                <listitem>
+                                        <para>Do not print the legend,
+                                        i.e. the column headers and
+                                        the footer.</para>
+                                </listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 operations.</para></listitem>
                         </varlistentry>
 
-                        <varlistentry>
-                                <term><option>-H</option></term>
-                                <term><option>--host</option></term>
-
-                                <listitem><para>Execute the operation
-                                remotely. Specify a hostname, or
-                                username and hostname separated by <literal>@</literal>,
-                                to connect to. This will use SSH to
-                                talk to the remote login manager
-                                instance.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>-M</option></term>
-                                <term><option>--machine=</option></term>
-
-                                <listitem><para>Execute the operation on a
-                                local container. Specify a container
-                                name to connect to.</para></listitem>
-                        </varlistentry>
-
                         <varlistentry>
                                 <term><option>-p</option></term>
                                 <term><option>--property=</option></term>
 
                                 <listitem><para>When showing
                                 session/user/seat properties, show all
-                                properties regardless whether they are
+                                properties regardless of whether they are
                                 set or not.</para></listitem>
                         </varlistentry>
 
                                 <constant>SIGTERM</constant>.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>-n</option></term>
+                                <term><option>--lines=</option></term>
+
+                                <listitem><para>When used with
+                                <command>user-status</command> and
+                                <command>session-status</command>,
+                                controls the number of journal lines
+                                to show, counting from the most recent
+                                ones. Takes a positive integer
+                                argument. Defaults to 10.</para>
+                                </listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>-o</option></term>
+                                <term><option>--output=</option></term>
+
+                                <listitem><para>When used with
+                                <command>user-status</command> and
+                                <command>session-status</command>,
+                                controls the formatting of the journal
+                                entries that are shown. For the
+                                available choices, see
+                                <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+                                Defaults to
+                                <literal>short</literal>.</para></listitem>
+                        </varlistentry>
+
+                        <xi:include href="user-system-options.xml" xpointer="host" />
+                        <xi:include href="user-system-options.xml" xpointer="machine" />
+
+                        <xi:include href="standard-options.xml" xpointer="help" />
+                        <xi:include href="standard-options.xml" xpointer="version" />
+                        <xi:include href="standard-options.xml" xpointer="no-pager" />
                 </variablelist>
+        </refsect1>
+
+        <refsect1>
+                <title>Commands</title>
 
                 <para>The following commands are understood:</para>
 
-                <variablelist>
+                <refsect2><title>Session Commands</title><variablelist>
+
                         <varlistentry>
                                 <term><command>list-sessions</command></term>
 
 
                                 <listitem><para>Show terse runtime
                                 status information about one or more
-                                sessions. This function is intended to
-                                generate human-readable output. If you
-                                are looking for computer-parsable
-                                output, use
-                                <command>show-session</command>
+                                sessions, followed by the most recent
+                                log data from the journal. This
+                                function is intended to generate
+                                human-readable output. If you are
+                                looking for computer-parsable output,
+                                use <command>show-session</command>
                                 instead.</para></listitem>
                         </varlistentry>
 
                                 <option>--signal=</option> to select
                                 the signal to send.</para></listitem>
                         </varlistentry>
+                </variablelist></refsect2>
 
+                <refsect2><title>User Commands</title><variablelist>
                         <varlistentry>
                                 <term><command>list-users</command></term>
 
 
                                 <listitem><para>Show terse runtime
                                 status information about one or more
-                                logged in users. This function is
-                                intended to generate human-readable
-                                output. If you are looking for
-                                computer-parsable output, use
-                                <command>show-user</command> instead.
-                                Users may be specified by their
-                                usernames or numeric user IDs.
+                                logged in users, followed by the most
+                                recent log data from the journal. This
+                                function is intended to generate
+                                human-readable output. If you are
+                                looking for computer-parsable output,
+                                use <command>show-user</command>
+                                instead.  Users may be specified by
+                                their usernames or numeric user IDs.
                                 </para></listitem>
                         </varlistentry>
 
                                 <option>--signal=</option> to select
                                 the signal to send.</para></listitem>
                         </varlistentry>
+                </variablelist></refsect2>
 
+                <refsect2><title>Seat Commands</title><variablelist>
                         <varlistentry>
                                 <term><command>list-seats</command></term>
 
                                 and deallocates all runtime resources
                                 attached to them.</para></listitem>
                         </varlistentry>
-                </variablelist>
+                </variablelist></refsect2>
 
         </refsect1>
 
                 code otherwise.</para>
         </refsect1>
 
-        <refsect1>
-                <title>Environment</title>
-
-                <variablelist class='environment-variables'>
-                        <varlistentry>
-                                <term><varname>$SYSTEMD_PAGER</varname></term>
-                                <listitem><para>Pager to use when
-                                <option>--no-pager</option> is not given;
-                                overrides <varname>$PAGER</varname>.  Setting
-                                this to an empty string or the value
-                                <literal>cat</literal> is equivalent to passing
-                                <option>--no-pager</option>.</para></listitem>
-                        </varlistentry>
-                </variablelist>
-        </refsect1>
+        <xi:include href="less-variables.xml" />
 
         <refsect1>
                 <title>See Also</title>