feat: add disown command

extended-job-api
TorchedSammy 2022-05-21 11:38:26 -04:00
parent fc40bad092
commit b3a5c0e67c
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
local commander = require 'commander'
commander.register('disown', function(args)
local id = tonumber(args[1])
if not id then
print 'invalid id for job'
return 1
end
local ok = pcall(hilbish.jobs.disown, id)
if not ok then
print 'job does not exist'
end
end)

View File

@ -4,3 +4,4 @@ require 'nature.commands.cdr'
require 'nature.commands.doc' require 'nature.commands.doc'
require 'nature.commands.exit' require 'nature.commands.exit'
require 'nature.commands.guide' require 'nature.commands.guide'
require 'nature.commands.disown'