-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_usermenu.lua.example
More file actions
81 lines (62 loc) · 2.42 KB
/
_usermenu.lua.example
File metadata and controls
81 lines (62 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
--[[ Menu Extending ]]--
----------------------------------------
--[[ Common Settings ]]--
--local logShow = context.ShowInfo
--rhlog.TblMsg(_G, "_G", 0, "f")
--rhlog.TblMsg(getfenv(), "getfenv", 1)
--local UseAutoAdding = true
local UseAutoAdding = false
----------------------------------------
--[[ Extend package.path ]]--
--[[
local function ExpandEnv (s)
return s:gsub("%%(.-)%%", win.GetEnv)
end
local PackPath = package.path
local LuaFAR_Path = ExpandEnv(win.GetEnv("LUAFAR_PATH") or "")
if string.len(LuaFAR_Path) > 0 then
if LuaFAR_Path:sub(-1, 1) ~= ";" then
LuaFAR_Path = LuaFAR_Path..";"
end
--far.Show(LuaFAR_Path)
if not PackPath:find(LuaFAR_Path, 1, true) then
PackPath = LuaFAR_Path..PackPath
end
end
package.path = PackPath
--]]
----------------------------------------
--[[ Add User Files ]]--
-- Add LuaFAR context features first only!!!
require "context.initiate" -- LFc initiate
MakeResident("context.resident") -- LFc resident
--MakeResident("Test_Redraw")
--return -- TEST LuaFAR context only
-- [==[
if UseAutoAdding then
--[[ Auto loading ]]--
--AutoInstall("", "%_.+menu%.lua$", 1) -- Загрузка всех _*menu.lua
--logShow({}, "UseAutoAdding = true")
--AutoInstall("scripts/", "%_.+menu%.lua$", 1) -- Загрузка всех _*menu.lua
AutoInstall("scripts/", "%_usermenu%.lua$", 1) -- Загрузка всех _usermenu.lua
else
--[[ Manual loading ]]--
--AddToMenu("c", "&Rh_Scripts package", nil, "scripts/Rh_Scripts/Common/rhsConfig")
AddUserFile('scripts/lfa_config/_usermenu.lua') -- LFA config menu
AddUserFile("scripts/Rh_Scripts/_usermenu.lua") -- Rh_Scripts menu
--AddUserFile("scripts/Rh_Scripts/_ucfgmenu.lua") -- Rh_Scripts config menu
AddUserFile("scripts/Rh_Scripts/_selfmenu.lua") -- Self-created menu
AddUserFile("scripts/TestScripts/_usermenu.lua") -- Test scripts menu
--AddUserFile('scripts/fl_scripts/_usermenu.lua') -- farlua scripts menu
end
--]==]
-- Add command to call from the command line, e.g.:
-- lfe:ren
--AddCommand("ren", "examples/lf_rename")
----------------------------------------
--[[ Some menu items ]]--
----------------------------------------
--[[ Command prefixes ]]--
--local rhlog = require "scripts/Rh_Scripts/Utils/Logging"
--rhlog.TblMsg(_G, "_G", 0, "tf")
--------------------------------------------------------------------------------