documentation: Clarify documentation for special environment variable "default".
The current documentation for the special environment variable "default" is confusing and unclear. This patch attempts to clean it up. In particular, the current documentation refers to the "number or title", but then in the example it gives, the menu entries and submenus all have numbers *in* their title; furthermore, there is no example given about how to choose the number, or any indication about whether counting is zero-indexed or 1-indexed. Having a cleaner example and presenting all variants (numeric, title, and id) should make it clearer to the user. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
5412028d19
commit
bf94ef7fbd
1 changed files with 20 additions and 17 deletions
|
@ -3218,9 +3218,10 @@ source for more details.
|
||||||
@node default
|
@node default
|
||||||
@subsection default
|
@subsection default
|
||||||
|
|
||||||
If this variable is set, it identifies a menu entry that should be selected
|
If this variable is set, it identifies a menu entry that should be
|
||||||
by default, possibly after a timeout (@pxref{timeout}). The entry may be
|
selected by default, possibly after a timeout (@pxref{timeout}). The
|
||||||
identified by number or by id.
|
entry may be identified by number (starting from 0 at each level of
|
||||||
|
the hierarchy), by title, or by id.
|
||||||
|
|
||||||
For example, if you have:
|
For example, if you have:
|
||||||
|
|
||||||
|
@ -3236,24 +3237,26 @@ then you can make this the default using:
|
||||||
default=example-gnu-linux
|
default=example-gnu-linux
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If the entry is in a submenu, then it must be identified using the titles of
|
If the entry is in a submenu, then it must be identified using the
|
||||||
each of the submenus starting from the top level followed by the number or
|
number, title, or id of each of the submenus starting from the top
|
||||||
title of the menu entry itself, separated by @samp{>}. For example, take
|
level, followed by the number, title, or id of the menu entry itself,
|
||||||
the following menu structure:
|
with each element separated by @samp{>}. For example, take the
|
||||||
|
following menu structure:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
Submenu 1
|
GNU/Hurd --id gnu-hurd
|
||||||
Menu Entry 1
|
Standard Boot --id=gnu-hurd-std
|
||||||
Menu Entry 2
|
Rescue shell --id=gnu-hurd-rescue
|
||||||
Submenu 2
|
Other platforms --id=other
|
||||||
Submenu 3
|
Minix --id=minix
|
||||||
Menu Entry 3
|
Version 3.4.0 --id=minix-3.4.0
|
||||||
Menu Entry 4
|
Version 3.3.0 --id=minix-3.3.0
|
||||||
Menu Entry 5
|
GRUB Invaders --id=grub-invaders
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
``Menu Entry 3'' would then be identified as
|
The more recent release of Minix would then be identified as
|
||||||
@samp{Submenu 2>Submenu 3>Menu Entry 3}.
|
@samp{Other platforms>Minix>Version 3.4.0}, or as @samp{1>0>0}, or as
|
||||||
|
@samp{other>minix>minix-3.4.0}.
|
||||||
|
|
||||||
This variable is often set by @samp{GRUB_DEFAULT} (@pxref{Simple
|
This variable is often set by @samp{GRUB_DEFAULT} (@pxref{Simple
|
||||||
configuration}), @command{grub-set-default}, or @command{grub-reboot}.
|
configuration}), @command{grub-set-default}, or @command{grub-reboot}.
|
||||||
|
|
Loading…
Reference in a new issue