Display running jobs (if any) in the shell prompt
To have in your shell prompt how many jobs are running (if any), add the following function to your .bashrc:
function j() {
jobs | wc -l | egrep -v ^0 | sed -r 's/^([0-9]+)/ (\1) /'
}
And then add the function call $(j)
to your PS1.
Written by François Pietka
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#