fish-shell/tests/jobs.in

24 lines
369 B
Fish
Raw Normal View History

2018-03-05 05:33:36 +08:00
jobs -q; echo $status
sleep 5 &
sleep 5 &
2016-06-09 07:09:29 +08:00
jobs -c
2018-03-05 05:33:36 +08:00
jobs -q; echo $status
bg -23 1 2>/dev/null
2017-06-15 09:25:51 +08:00
or echo bg: invalid option -23 >&2
fg 3
bg 3
sleep 1 &
disown
jobs -c
disown foo
disown (jobs -p)
or exit 0
2019-04-19 14:08:16 +08:00
# Verify `jobs` output within a function lists background jobs
2019-04-19 14:08:16 +08:00
# https://github.com/fish-shell/fish-shell/issues/5824
function foo
sleep 0.2 &
jobs -c
2019-04-19 14:08:16 +08:00
end
foo