Skip to content

Instantly share code, notes, and snippets.

@nocd5
Last active September 18, 2015 10:32
Show Gist options
  • Save nocd5/2a0ed6c2dabf682e946a to your computer and use it in GitHub Desktop.
Save nocd5/2a0ed6c2dabf682e946a to your computer and use it in GitHub Desktop.
nyagosのpanic再現パタン
function sleep(n)
local t = os.time()
while os.time() - t <= n do end
end
local _prompt = nyagos.prompt
nyagos.prompt = function(template)
sleep(1)
return _prompt('nyagos > ')
end
nyagos.alias.foo = function()
print("alias.foo -->")
sleep(1)
print("<-- alias.foo")
end
nyagos.on_command_not_found = function(args)
print("on_command_not_found -->")
sleep(1)
print("<-- on_command_not_found")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment