From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TxIcL-0001PR-DI for mharc-grub-devel@gnu.org; Mon, 21 Jan 2013 09:44:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxIcI-0001OC-Tw for grub-devel@gnu.org; Mon, 21 Jan 2013 09:44:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxIcH-0001ye-Mx for grub-devel@gnu.org; Mon, 21 Jan 2013 09:44:54 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:44865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxIcH-0001xg-E6 for grub-devel@gnu.org; Mon, 21 Jan 2013 09:44:53 -0500 Received: by mail-la0-f51.google.com with SMTP id fj20so6290779lab.38 for ; Mon, 21 Jan 2013 06:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type; bh=g1CjIgCncgvIe0RZjVNX0rxRnF4sMzfM2pLDoNfElQ8=; b=JGyGplUiwEfnc+JLpy2uRCIjE7jEQ9pR0lmnHdJuAGwq9qGcDRctgGnL+gyb7/rcgp mw8KsZ9FvHI1zMFvAwlYVTAvIcqUn98YaEBmasymmPwjm1EsGz0SmKRElO+ptckViQf/ gOiQH0pndI0ZQEQmdRBzJJyPUxOVKa2O5VQeYaM1iIXc3coulpCBIV39I/8v+tK0K6X6 zk3x3W5F3B86S6erobg2vJiSJNGoE4wyNi1BMvryYS3au874c+K/RIOosYegXWmPZ6sM m2smKb4FLUoLh8zp6V/stPtfvTjjktbaB2WWrCNp4HBgdNT6xXFaKY2hxfi5D5sCqUv7 MwBg== X-Received: by 10.152.114.66 with SMTP id je2mr17502640lab.40.1358779491394; Mon, 21 Jan 2013 06:44:51 -0800 (PST) Received: from opensuse.site (ppp91-78-198-46.pppoe.mtu-net.ru. [91.78.198.46]) by mx.google.com with ESMTPS id n2sm5625867lbc.5.2013.01.21.06.44.49 (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 21 Jan 2013 06:44:50 -0800 (PST) Date: Mon, 21 Jan 2013 18:44:46 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [PATCH] Document menuentry --id option Message-ID: <20130121184446.5ab5fe87@opensuse.site> In-Reply-To: <50FC7502.2070006@gmail.com> References: <1347987201.1612.5.camel@opensuse.site> <50FC7502.2070006@gmail.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/NIL5ntlMWNOrgaYZt=IHd=p"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.215.51 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2013 14:44:56 -0000 --Sig_/NIL5ntlMWNOrgaYZt=IHd=p Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sun, 20 Jan 2013 23:51:46 +0100 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > > @deffn Command menuentry @var{title} @ > > [@option{--class=3Dclass} @dots{}] [@option{--users=3Dusers}] @ > > - [@option{--unrestricted}] [@option{--hotkey=3Dkey}] @ > > + [@option{--unrestricted}] [@option{--hotkey=3Dkey}] [@option{--id=3Di= d}] @ > > @{ @var{command}; @dots{} @} > > This defines a GRUB menu entry named @var{title}. When this entry is > > selected from the menu, GRUB will set the @var{chosen} environment var= iable > > -to @var{title}, execute the list of commands given within braces, and = if the > > +to value of @option{--id} or @var{title} if @option{--id} is not given, > > +execute the list of commands given within braces, and if the >=20 > It's better to not mention the possible usage of title for this at all. > Ehile it's kept for backward compatibility it has problems when language > or disk name changes and hence discouraged. >=20 I understand that, but you still need to explain what happens when --id is not given. Or make it mandatory argument. > > last command in the list returned successfully and a kernel was loaded= it > > will execute the @command{boot} command. > > =20 > > @@ -3135,6 +3136,9 @@ > > The @option{--hotkey} option associates a hotkey with a menu entry. > > @var{key} may be a single letter, or one of the aliases @samp{backspac= e}, > > @samp{tab}, or @samp{delete}. > > + > > +The @option{--id} may be used to associate unique identifier with a me= nu entry. > > +@var{id} is arbitrary string. >=20 > It has to be > [a-zA-Z_][0-9a-zA-Z_]* It is not what grub currently does :) Do you really mean underscore? Grub is currently using hyphen. > (while arbitrary string would work it's not a good idea. >=20 Sure, but again - it can be arbitrary string. Nothing restricts character set used. My goal is to document current grub behavior. Lying about what it does just adds to confusion. I'm fine with adding "it is recommended to restrict value @var{id} to alphanumeric ASCII characters, hyphen and underscore for portability". --Sig_/NIL5ntlMWNOrgaYZt=IHd=p Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlD9VF4ACgkQR6LMutpd94yRvQCeJnHSHMn13eE8DWrpqpw9btkI zw8AnRyIjk54jt+8C33lcjfZl0N6l3s4 =wBw0 -----END PGP SIGNATURE----- --Sig_/NIL5ntlMWNOrgaYZt=IHd=p--