diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-04-16 13:20:40 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-04-16 13:20:40 +0200 |
commit | 218228536ed709be8ab2dde4a00dc27249ceed8a (patch) | |
tree | 71b331e3d99ebd89fefcc1cb369d233c5c7fbdc1 /scripts/context/lua/mtx-server-ctx-help.lua | |
parent | ea2466fe69bd082d379e95e1567f3de0b76de243 (diff) | |
download | context-218228536ed709be8ab2dde4a00dc27249ceed8a.tar.gz |
2017-04-16 12:47:00
Diffstat (limited to 'scripts/context/lua/mtx-server-ctx-help.lua')
-rw-r--r-- | scripts/context/lua/mtx-server-ctx-help.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-server-ctx-help.lua b/scripts/context/lua/mtx-server-ctx-help.lua index 04217dab9..2e8b87f32 100644 --- a/scripts/context/lua/mtx-server-ctx-help.lua +++ b/scripts/context/lua/mtx-server-ctx-help.lua @@ -245,6 +245,7 @@ local function getnames(root,interface) local found = { } local names = { } local groups = { } + local extra = { } for e in xmlcollected(root,'cd:interface/cd:interface') do local category = match(e.at.file or "","^i%-(.*)%.xml$") local list = { } @@ -256,6 +257,7 @@ local function getnames(root,interface) names[#names+1] = t list[#list+1] = t found[idname] = e + extra[csname] = e else -- variant end @@ -268,11 +270,11 @@ local function getnames(root,interface) end sort(names, function(a,b) return lower(a[2]) < lower(b[2]) end) sort(groups, function(a,b) return lower(a[1]) < lower(b[1]) end) - return names, groups, found + return names, groups, found, extra end local loaded = setmetatableindex(function(loaded,interface) - local names, groups, found = getnames(usedsetuproot,interface) + local names, groups, found, extra = getnames(usedsetuproot,interface) local current = { interface = interface, root = usedsetuproot, @@ -280,13 +282,14 @@ local loaded = setmetatableindex(function(loaded,interface) names = names, groups = groups, found = found, + extra = extra, } loaded[interface] = current return current end) local function collect(current,name,interface,lastmode) - local command = current.found[name] + local command = current.found[name] or current.extra[name] if command then local definitions = current.definitions local attributes = command.at or { } |