This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
cmd:item [2012/03/28 23:57] mcb30 created |
cmd:item [2012/04/28 22:40] mcb30 |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Synopsis ===== | ===== Synopsis ===== | ||
- | item [--menu <menu>] [--key <key>] [--default] <label> [<text>] | + | item [--menu <menu>] [--key <key>] [--default] [<label>|--gap [<text>]] |
===== Examples ===== | ===== Examples ===== | ||
Line 21: | Line 21: | ||
item san Boot from ${root-path} | item san Boot from ${root-path} | ||
+ | |||
+ | === Add a menu separator === | ||
+ | |||
+ | item --gap Operating systems: | ||
+ | |||
+ | === Add a blank menu separator === | ||
+ | |||
+ | item | ||
===== Description ===== | ===== Description ===== | ||
- | Add a menu item with the specified label and display text. If no menu is specified, the default (unnamed) menu will be used. If a key is specified, it will be used as the shortcut key for the menu item. If the ''%%--default%%'' option is specified, the menu item will become the default selection. | + | Add a menu item with the specified label and display text. If no menu is specified, the default (unnamed) menu will be used. If a key is specified, it will be used as the shortcut key for the menu item. If the ''%%--default%%'' option is specified, the menu item will become the default selection. If no label is provided or if the ''%%--gap%%'' option is specified, the menu item will function as a menu separator (which cannot be selected by the user). |
The label will not be displayed. It will be used by the ''[[:cmd:choose]]'' command to indicate the selection made by the user. | The label will not be displayed. It will be used by the ''[[:cmd:choose]]'' command to indicate the selection made by the user. | ||
Line 58: | Line 66: | ||
===== Notes ===== | ===== Notes ===== | ||
+ | |||
+ | The display text will be truncated if necessary to fit within the available width. | ||
Shortcut keys are not automatically displayed. You may wish to include an indication of the shortcut key within the display text. For example: | Shortcut keys are not automatically displayed. You may wish to include an indication of the shortcut key within the display text. For example: | ||
- | item --key f Boot (F)edora | + | item --key f fedora Boot (F)edora |
- | item --key x Boot Windows (X)P | + | item --key x winxp Boot Windows (X)P |
+ | |||
+ | You can specify a menu's default item either by using the ''--default'' option when creating the menu item with the ''item'' command, or by using the ''--default <label>'' option when displaying the menu with the ''[[:cmd:choose]]'' command. | ||
+ | |||
+ | If you want your menu separator text to start with dashes, then you must use ''%%--%%'' to prevent iPXE from attempting to interpret your separator text as an option. For example: | ||
+ | item --gap -- ---------------- Advanced configuration ---------------- |