fix: update to work with latest hilbish

pull/24/head
TorchedSammy 2021-04-05 17:27:55 -04:00
parent 271ea946eb
commit 898f8816ff
1 changed files with 4 additions and 8 deletions

View File

@ -3,23 +3,19 @@ ansikit = require 'ansikit'
bait = require 'bait'
function doPrompt(fail)
prompt(ansikit.text(
prompt(ansikit.format(
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆{reset} '
))
end
print(ansikit.text('Welcome {cyan}'.. os.getenv 'USER' ..
print(ansikit.format('Welcome {cyan}'.. os.getenv 'USER' ..
'{reset} to {magenta}Hilbish{reset},\n' ..
'the nice lil shell for {blue}Lua{reset} fanatics!\n'))
doPrompt()
bait.catch('command.fail', function()
doPrompt(true)
end)
bait.catch('command.success', function()
doPrompt()
bait.catch('command.exit', function(code)
doPrompt(code ~= 0)
end)
--hook("tab complete", function ())