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 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));
|
||||
RegDeleteKeyEx(root, keyBaseName, KEY_ALL_ACCESS, NULL);
|
||||
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
|
||||
|
||||
local cmder_user_config_dir = clink.get_env('CMDER_USER_CONFIG')..'/'
|
||||
for _,lua_module in ipairs(clink.find_files(cmder_user_config_dir..'*.lua')) do
|
||||
-- Skip files that starts with _. This could be useful if some files should be ignored
|
||||
if not string.match(lua_module, '^_.*') then
|
||||
local filename = cmder_user_config_dir..lua_module
|
||||
-- use dofile instead of require because require caches loaded modules
|
||||
-- so config reloading using Alt-Q won't reload updated modules.
|
||||
dofile(filename)
|
||||
end
|
||||
if clink.get_env('CMDER_USER_CONFIG') then
|
||||
local cmder_user_config_dir = clink.get_env('CMDER_USER_CONFIG')..'/'
|
||||
for _,lua_module in ipairs(clink.find_files(cmder_user_config_dir..'*.lua')) do
|
||||
-- Skip files that starts with _. This could be useful if some files should be ignored
|
||||
if not string.match(lua_module, '^_.*') then
|
||||
local filename = cmder_user_config_dir..lua_module
|
||||
-- use dofile instead of require because require caches loaded modules
|
||||
-- so config reloading using Alt-Q won't reload updated modules.
|
||||
dofile(filename)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user