mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
run user lua afer cmder lua
This commit is contained in:
parent
e93231114f
commit
e69e7f9b82
@ -363,7 +363,7 @@ void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
|||||||
{
|
{
|
||||||
HKEY root = GetRootKey(opt);
|
HKEY root = GetRootKey(opt);
|
||||||
HKEY cmderKey;
|
HKEY cmderKey;
|
||||||
// FAIL_ON_ERROR(RegCreateKeyEx(root, keyBaseName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
FAIL_ON_ERROR(RegCreateKeyEx(root, keyBaseName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||||
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
||||||
RegDeleteKeyEx(root, keyBaseName, KEY_ALL_ACCESS, NULL);
|
RegDeleteKeyEx(root, keyBaseName, KEY_ALL_ACCESS, NULL);
|
||||||
RegCloseKey(cmderKey);
|
RegCloseKey(cmderKey);
|
||||||
|
20
vendor/clink.lua
vendored
20
vendor/clink.lua
vendored
@ -370,13 +370,15 @@ for _,lua_module in ipairs(clink.find_files(cmder_config_dir..'*.lua')) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local cmder_user_config_dir = clink.get_env('CMDER_USER_CONFIG')..'/'
|
if clink.get_env('CMDER_USER_CONFIG') then
|
||||||
for _,lua_module in ipairs(clink.find_files(cmder_user_config_dir..'*.lua')) do
|
local cmder_user_config_dir = clink.get_env('CMDER_USER_CONFIG')..'/'
|
||||||
-- Skip files that starts with _. This could be useful if some files should be ignored
|
for _,lua_module in ipairs(clink.find_files(cmder_user_config_dir..'*.lua')) do
|
||||||
if not string.match(lua_module, '^_.*') then
|
-- Skip files that starts with _. This could be useful if some files should be ignored
|
||||||
local filename = cmder_user_config_dir..lua_module
|
if not string.match(lua_module, '^_.*') then
|
||||||
-- use dofile instead of require because require caches loaded modules
|
local filename = cmder_user_config_dir..lua_module
|
||||||
-- so config reloading using Alt-Q won't reload updated modules.
|
-- use dofile instead of require because require caches loaded modules
|
||||||
dofile(filename)
|
-- so config reloading using Alt-Q won't reload updated modules.
|
||||||
end
|
dofile(filename)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user