diff --git a/nature/commands/disown.lua b/nature/commands/disown.lua new file mode 100644 index 0000000..3d72719 --- /dev/null +++ b/nature/commands/disown.lua @@ -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) diff --git a/nature/commands/init.lua b/nature/commands/init.lua index e824c7c..589cbd5 100644 --- a/nature/commands/init.lua +++ b/nature/commands/init.lua @@ -4,3 +4,4 @@ require 'nature.commands.cdr' require 'nature.commands.doc' require 'nature.commands.exit' require 'nature.commands.guide' +require 'nature.commands.disown'