-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing #117 requires a change in Cmder.
So, for best compatibility, clink-completions will have both .init.lua and !init.lua files.
- Loading branch information
1 parent
fd89185
commit 93c1b8f
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
-- The line below extends package.path with modules | ||
-- directory to allow to require them | ||
package.path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]] .."modules/?.lua;".. package.path | ||
-- Extend package.path with modules directory, if not already present, to allow | ||
-- using require() with them. | ||
-- | ||
-- Note: This happens in both .init.lua and !init.lua because older Cmder | ||
-- versions don't know about !init.lua. | ||
local modules_path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]] .."modules/?.lua" | ||
if not package.path:find(modules_path, 1, true--[[plain]]) then | ||
package.path = modules_path..";"..package.path | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Extend package.path with modules directory, if not already present, to allow | ||
-- using require() with them. | ||
-- | ||
-- Note: This happens in both .init.lua and !init.lua because older Cmder | ||
-- versions don't know about !init.lua. | ||
local modules_path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]] .."modules/?.lua" | ||
if not package.path:find(modules_path, 1, true--[[plain]]) then | ||
package.path = modules_path..";"..package.path | ||
end |