2022-05-24 23:15:02 +00:00
|
|
|
local commander = require 'commander'
|
|
|
|
|
2023-01-20 23:07:42 +00:00
|
|
|
commander.register('bg', function(_, sinks)
|
2022-05-24 23:15:02 +00:00
|
|
|
local job = hilbish.jobs.last()
|
|
|
|
if not job then
|
2023-01-20 23:07:42 +00:00
|
|
|
sinks.out:writeln 'bg: no last job'
|
2022-05-24 23:15:02 +00:00
|
|
|
return 1
|
|
|
|
end
|
|
|
|
|
|
|
|
local err = job.background()
|
|
|
|
if err then
|
2023-01-20 23:07:42 +00:00
|
|
|
sinks.out:writeln('bg: ' .. err)
|
2022-05-24 23:15:02 +00:00
|
|
|
return 2
|
|
|
|
end
|
|
|
|
end)
|