fish, version 3.0.2
In a script, I want to see whether a previous job is still running. I saw a "--quiet" flag, so I thought the following would work:
start-the-job &
set -l pid (jobs -lp)
# ... stuff ...
if jobs -q $pid
echo "Job is still running"
end
But if the job has finished, this still prints jobs: No suitable job: 47362.
In fact, if the PID does not point to a fish job, there's no difference in the behaviour of jobs $badpid and jobs -q $badpid.
Is it reasonable to make the -q flag suppress that output as well? I've looked at the code and it doesn't seem like a huge change, but I'm not sure if there are reasons to not make this change.
fish, version 3.0.2
In a script, I want to see whether a previous job is still running. I saw a "--quiet" flag, so I thought the following would work:
But if the job has finished, this still prints
jobs: No suitable job: 47362.In fact, if the PID does not point to a fish job, there's no difference in the behaviour of
jobs $badpidandjobs -q $badpid.Is it reasonable to make the
-qflag suppress that output as well? I've looked at the code and it doesn't seem like a huge change, but I'm not sure if there are reasons to not make this change.