How do I make my tcsh shell prompt to show unfinished background jobs? I understand %j
will tell me unfinished job number count but prompt goes stale if I keep it idle. Ideally, I would like prompt to get updated automatically. Basically, I want to avoid keep typing bjobs commands to check if all the jobs I submitted are completed.
Linux – tcsh shell prompt to show unfinished jobs count
linuxprompttcsh
Best Answer
This would set the prompt to the current number of background jobs, followed by
>
or#
for root (unlesspromptchars
has been changed from the default).Testing it:
Then start a couple of background jobs:
As you see, the job count in the prompt is not updated when you just press Enter. It will be updated once you enter a new command though:
You mentioned
bjobs
. This is an LFS command and not related totcsh
at all. Please update the question with further information if this was intentional or not.