Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cmd:item [2012/03/29 13:20]
mcb30
cmd:item [2024/05/17 15:28] (current)
mcb30
Line 3: Line 3:
 ===== Synopsis ===== ===== Synopsis =====
  
-    item [--menu <​menu>​] [--key <​key>​] [--default] [<label>|--gap [<​text>​]]+    item [--menu <​menu>​] [--key <​key>​] [--default] [<name>|--gap [<​text>​]]
  
 ===== Examples ===== ===== Examples =====
Line 32: Line 32:
 ===== 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. ​ 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).+Add a menu item with the specified ​name and display text.  If no menu is specified, the default 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 name 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 name will not be displayed. ​ It will be used by the ''​[[:​cmd:​choose]]''​ command to indicate the selection made by the user.
  
 The shortcut key can be specified as a character literal (such as ''​f''​) or as an extended ASCII character value. ​ The values for special keys such as ''​Ctrl-B''​ and ''​F12''​ are defined in [[http://​git.ipxe.org/​ipxe.git/​blob/​HEAD:/​src/​include/​ipxe/​keys.h|include/​ipxe/​keys.h]] within the iPXE source code.  Some useful values are: The shortcut key can be specified as a character literal (such as ''​f''​) or as an extended ASCII character value. ​ The values for special keys such as ''​Ctrl-B''​ and ''​F12''​ are defined in [[http://​git.ipxe.org/​ipxe.git/​blob/​HEAD:/​src/​include/​ipxe/​keys.h|include/​ipxe/​keys.h]] within the iPXE source code.  Some useful values are:
Line 66: 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 <​name>​%%''​ 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: 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 ----------------     item --gap -- ---------------- Advanced configuration ----------------
- 
cmd/item.1333027208.txt.gz · Last modified: 2012/03/29 13:20 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.