File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S luajittex --luaonly
2+ local string = require "string"
3+ local package = require "package"
4+ local version = string.gsub(_VERSION, ".* ", "")
5+ local path = package.path
6+ local cpath = package.cpath
7+ package.path = package.path .. ";/usr/share/lua/" .. version .. "/?.lua;/usr/share/lua/" .. version .. "/?/init.lua"
8+ local ext = string.match(package.cpath, '([^.]+)[;|$]')
9+ package.cpath = package.cpath .. ";/usr/lib/lua/" .. version .. "/?." .. ext
10+
11+ local prompt = require "prompt"
12+ prompt.name = 'texlua'
13+ prompt.prompts = { '> ', '>> ' }
14+ prompt.colorize = true
15+ prompt.history = os.getenv('HOME') .. '/.lua_history'
16+
17+ for _, name in ipairs { os.getenv('HOME') .. '/.luaprc.lua',
18+ os.getenv('HOME') .. '/.config/luaprc.lua' } do
19+ local f = io.open(name, "r")
20+ if f ~= nil then
21+ io.close(f)
22+
23+ chunk, message = loadfile(name)
24+
25+ if chunk then
26+ chunk()
27+ else
28+ print(message)
29+ end
30+
31+ break
32+ end
33+ end
34+
35+ package.path = path
36+ package.cpath = cpath
37+ prompt.enter()
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ build = {
4343 bin = {
4444 " bin/nvimp" ,
4545 " bin/texluap" ,
46+ " bin/texluajitp" ,
4647 " bin/pandocp" ,
4748 " bin/neomuttp"
4849 },
You can’t perform that action at this time.
0 commit comments