Skip to content

Commit a1fb5e8

Browse files
committed
🩹 Use status.list().luatex_engine
1 parent 2d0677e commit a1fb5e8

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

bin/texluajitp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S luajittex --luaonly
2-
kpse.set_program_name('luajittex')
2+
kpse.set_program_name(status.list().luatex_engine)
33
local utils = require "prompt.utils"
44

55
utils.init()

bin/texluap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S luatex --luaonly
2-
kpse.set_program_name('luatex')
2+
kpse.set_program_name(status.list().luatex_engine)
33
local utils = require "prompt.utils"
44

55
utils.init()

lua/prompt/utils.lua

+10-1
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,18 @@ end
200200

201201
---init prompt
202202
function M.init()
203-
if arg and arg[0] and prompt.name == "lua" then
203+
-- luacheck: ignore 111 113
204+
---@diagnostic disable: undefined-global
205+
if vim then
206+
prompt.name = "nvim"
207+
elseif pandoc then
208+
prompt.name = "pandoc"
209+
elseif status then
210+
prompt.name = status.list().luatex_engine
211+
elseif arg and arg[0] and prompt.name == "lua" then
204212
prompt.name = arg[0]:gsub(".*/", ""):gsub("p$", "")
205213
end
214+
206215
prompt.prompts = prompt.prompts or { '> ', '>> ' }
207216
if prompt.colorize == nil then
208217
prompt.colorize = true

0 commit comments

Comments
 (0)