[ipxe-devel] [ipxe] Add set option to prompt to save the input key as a variable (#40)
renini
notifications at github.com
Tue Nov 17 16:12:37 UTC 2015
Ability to save the input key when using 'prompt' as a variable.
With this you are able to use this in the script further on, for example:
prompt --set keycombo --timeout 5000 Press Ctrl-B for the menu... && goto keypress || goto exit
:keypress
isset ${keycombo} || set keycombo 0x2
iseq ${keycombo} 0x1 && goto ctrla ||
iseq ${keycombo} 0x2 && goto ctrlb ||
iseq ${keycombo} 0x11 && goto ctrlq ||
echo You pressed: ${keycombo}
goto exit
You can view, comment on, or merge this pull request online at:
https://github.com/ipxe/ipxe/pull/40
-- Commit Summary --
* Add set option to prompt to save the input key as a variable
-- File Changes --
M src/image/script.c (36)
M src/include/usr/prompt.h (2)
M src/usr/autoboot.c (14)
M src/usr/prompt.c (15)
-- Patch Links --
https://github.com/ipxe/ipxe/pull/40.patch
https://github.com/ipxe/ipxe/pull/40.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/40
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20151117/77ea6da0/attachment.htm>
More information about the ipxe-devel
mailing list