If a command spanning over multiple lines is sent to background, the jobs
command also prints that command over multiple lines in its output. This makes
parsing it harder.
As a consequence, count (jobs) does not return the expected result in that
case. (A workaround is to use count (jobs -g) instead).
For example, this returns a count of 2 instead of 1 job:
> sleep \
1000 &
> jobs
Job Group CPU State Command
1 2667403 0% running sleep \
1000 &
> count (jobs)
2
It could be nicer to force the content of the "Command" field to stay on one
line.
Fish version 3.6.1 on Linux (NixOS).
If a command spanning over multiple lines is sent to background, the
jobscommand also prints that command over multiple lines in its output. This makes
parsing it harder.
As a consequence,
count (jobs)does not return the expected result in thatcase. (A workaround is to use
count (jobs -g)instead).For example, this returns a count of 2 instead of 1 job:
It could be nicer to force the content of the "Command" field to stay on one
line.
Fish version 3.6.1 on Linux (NixOS).