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'
|
||||
|
||||
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 ())
|
||||
|
|
Loading…
Reference in New Issue