<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>sg</command>
- <arg choice='opt'>- </arg>
+ <arg choice='opt'>
+ <replaceable>-</replaceable>
+ </arg>
<arg choice='plain'>
<replaceable>group</replaceable>
</arg>
<arg choice='opt'>
- <arg choice='opt'>-c </arg>
- command
+ <arg choice='opt'><replaceable>-c</replaceable></arg>
+ <replaceable>command</replaceable>
</arg>
</cmdsynopsis>
</refsynopsisdiv>
</para>
</refsect1>
+ <refsect1 id='options'>
+ <title>OPTIONS</title>
+ <para>
+ The options which apply to the <command>sg</command> command are:
+ </para>
+ <variablelist remap='IP'>
+ <varlistentry>
+ <term><option>-</option>, <option>-l</option></term>
+ <listitem>
+ <para>
+ Start the shell as a login shell.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-c</option>
+ </term>
+ <listitem>
+ <para>
+ Specify a command that will be invoked by the shell using its
+ <option>-c</option>.
+ </para>
+ <para>
+ This is the default; for backward compatibility.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
<refsect1 id='configuration'>
<title>CONFIGURATION</title>
<para>
if (is_newgrp) {
(void) fputs (_("Usage: newgrp [-] [group]\n"), stderr);
} else {
- (void) fputs (_("Usage: sg group [[-c] command]\n"), stderr);
+ (void) fputs (_("Usage: sg [-] group [[-c] command]\n"), stderr);
}
}
* The valid syntax are
* newgrp [-] [groupid]
* newgrp [-l] [groupid]
- * sg [-]
- * sg [-] groupid [[-c command]
+ * sg [-] groupid [[-c] command]
+ * sg [-l] groupid [[-c] command]
*/
if ( (argc > 0)
&& ( streq(argv[0], "-")
/*
* Skip -c if specified so both forms work:
- * "sg group -c command" (as in the man page) or
- * "sg group command" (as in the usage message).
+ * "sg group -c command" or "sg group command".
*/
if ((argc > 1) && streq(argv[0], "-c")) {
command = argv[1];