1
0
Fork 0
forked from len0rd/rockbox

hwstub: Add completion and some pretty printing to the shell

This uses slightly hacked luaprompt to provide all the goodis.
See https://github.com/dpapavas/luaprompt for original.

Change-Id: Iedddb79abae5809299322bc215722dd928c35cca
This commit is contained in:
Marcin Bukat 2015-06-28 17:51:43 +02:00
parent 465eb727a3
commit e70ea5d21f
5 changed files with 1724 additions and 18 deletions

View file

@ -22,6 +22,8 @@ function HWLIB.load_blob(filename, address)
io.close(f)
end
function HWLIB.printf(s,...)
return io.write(s:format(...))
function HWLIB.printf(...)
local function wrapper(...) io.write(string.format(...)) end
local status, result = pcall(wrapper, ...)
if not status then error(result, 2) end
end