bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `jobs` shows output even when nothing has been started in the backgr


From: Ajeet D'Souza
Subject: Re: `jobs` shows output even when nothing has been started in the background
Date: Sat, 17 Jun 2023 00:09:00 +0530

Hi,

Thanks for all the help! I created a PR with this workaround on the
Starship repository: https://github.com/starship/starship/pull/5253

Regards,
Ajeet

On Sat, Jun 17, 2023 at 12:00 AM Chet Ramey <chet.ramey@case.edu> wrote:

> On 6/14/23 6:12 PM, Ajeet D'Souza wrote:
> > Hey Chet,
> >
> > Thanks for the quick reply. I have some follow-up questions:
> >
> >   * Is there an elegant way I can start an external process without it
> >     showing up under jobs, even on affected versions? My current best
> idea
> >     is: (_="$(/bin/echo)"; jobs -l)
>
> You can try to disown it.
>
> >   * Is there an elegant way I can get the correct number of jobs, even on
> >     affected versions? My current best idea is to run jobsonce before
> doing
> >     the count: (jobs &> /dev/null; jobs | wc -l)
>
> You have to get the jobs you're not interested in removed from the jobs
> table. That's as good a way as any if you don't know the job number or
> if it's not the current job.
>
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]