mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 09:48:00 +01:00
trivial refactoring of :emenu and :chdir actions
This commit is contained in:
committed by
Kris Maglione
parent
39d6542e80
commit
89dc3c2078
@@ -289,18 +289,18 @@ const liberator = (function () //{{{
|
||||
"Execute the specified menu item from the command line",
|
||||
function (args)
|
||||
{
|
||||
args = args.literalArg;
|
||||
let arg = args.literalArg;
|
||||
let items = getMenuItems();
|
||||
|
||||
if (!items.some(function (i) i.fullMenuPath == args))
|
||||
if (!items.some(function (i) i.fullMenuPath == arg))
|
||||
{
|
||||
liberator.echoerr("E334: Menu not found: " + args);
|
||||
liberator.echoerr("E334: Menu not found: " + arg);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let [,item] in Iterator(items))
|
||||
{
|
||||
if (item.fullMenuPath == args)
|
||||
if (item.fullMenuPath == arg)
|
||||
item.doCommand();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user