Skip to content

Commit

Permalink
Fix an issue with clink.find_files() return order not always consiste…
Browse files Browse the repository at this point in the history
…nt, leading to .init.lua not being run first lua path being broken (#2278)
  • Loading branch information
Mikaz-fr authored Mar 14, 2020
1 parent a92bb19 commit 1071221
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vendor/clink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ clink.prompt.register_filter(svn_prompt_filter, 50)
clink.prompt.register_filter(percent_prompt_filter, 51)

local completions_dir = clink.get_env('CMDER_ROOT')..'/vendor/clink-completions/'
-- Execute '.init.lua' first to ensure package.path is set properly
dofile(completions_dir..'.init.lua')
for _,lua_module in ipairs(clink.find_files(completions_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
Expand Down

0 comments on commit 1071221

Please # to comment.