mirror of https://github.com/Hilbis/Hilbish
fix: update to work with latest hilbish
parent
271ea946eb
commit
898f8816ff
|
@ -3,23 +3,19 @@ ansikit = require 'ansikit'
|
||||||
bait = require 'bait'
|
bait = require 'bait'
|
||||||
|
|
||||||
function doPrompt(fail)
|
function doPrompt(fail)
|
||||||
prompt(ansikit.text(
|
prompt(ansikit.format(
|
||||||
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆{reset} '
|
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆{reset} '
|
||||||
))
|
))
|
||||||
end
|
end
|
||||||
|
|
||||||
print(ansikit.text('Welcome {cyan}'.. os.getenv 'USER' ..
|
print(ansikit.format('Welcome {cyan}'.. os.getenv 'USER' ..
|
||||||
'{reset} to {magenta}Hilbish{reset},\n' ..
|
'{reset} to {magenta}Hilbish{reset},\n' ..
|
||||||
'the nice lil shell for {blue}Lua{reset} fanatics!\n'))
|
'the nice lil shell for {blue}Lua{reset} fanatics!\n'))
|
||||||
|
|
||||||
doPrompt()
|
doPrompt()
|
||||||
|
|
||||||
bait.catch('command.fail', function()
|
bait.catch('command.exit', function(code)
|
||||||
doPrompt(true)
|
doPrompt(code ~= 0)
|
||||||
end)
|
|
||||||
|
|
||||||
bait.catch('command.success', function()
|
|
||||||
doPrompt()
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--hook("tab complete", function ())
|
--hook("tab complete", function ())
|
||||||
|
|
Loading…
Reference in New Issue