mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
3dfaa192da
These were removed in f8b2e818ed
under a
belief that they were unused. But they are documented and supported.
32 lines
582 B
Fish
32 lines
582 B
Fish
jobs -q; echo $status
|
|
sleep 5 &
|
|
sleep 5 &
|
|
jobs -c
|
|
jobs -q; echo $status
|
|
bg -23 1 2>/dev/null
|
|
or echo bg: invalid option -23 >&2
|
|
fg 3
|
|
bg 3
|
|
sleep 1 &
|
|
disown
|
|
jobs -c
|
|
disown foo
|
|
disown (jobs -p)
|
|
or exit 0
|
|
|
|
# Verify `jobs` output within a function lists background jobs
|
|
# https://github.com/fish-shell/fish-shell/issues/5824
|
|
function foo
|
|
sleep 0.2 &
|
|
jobs -c
|
|
end
|
|
foo
|
|
|
|
# Verify we observe job exit events
|
|
sleep 1 &
|
|
set sleep_job $last_pid
|
|
function sleep_done_$sleep_job --on-job-exit $sleep_job
|
|
/bin/echo "sleep is done"
|
|
functions --erase sleep_done_$sleep_job
|
|
end
|
|
sleep 2
|