Date: Fri, 16 Feb 2018 22:17:30 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329413 - head/stand/lua Message-ID: <201802162217.w1GMHUmd064727@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Fri Feb 16 22:17:30 2018 New Revision: 329413 URL: https://svnweb.freebsd.org/changeset/base/329413 Log: stand/lua: Allow MENU_RETURN items to have a func, fix escape to prompt Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Fri Feb 16 21:59:08 2018 (r329412) +++ head/stand/lua/menu.lua Fri Feb 16 22:17:30 2018 (r329413) @@ -161,6 +161,9 @@ menu.welcome = { name = function() return color.highlight("Esc").."ape to loader prompt"; end, + func = function() + loader.setenv("autoboot_delay", "NO") + end, alias = {core.KEYSTR_ESCAPE} }, @@ -301,6 +304,10 @@ function menu.run(m) -- recurse cont = menu.run(sel_entry.submenu()); elseif (sel_entry.entry_type == core.MENU_RETURN) then + -- allow entry to have a function/side effect + if (sel_entry.func ~= nil) then + sel_entry.func(); + end -- break recurse cont = false; end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802162217.w1GMHUmd064727>