Do not fail if screen(1) is not installed

If screen is not present then an error message is displayed each time
the prompt is displayed:
-bash: screen : command not found

The error message is now sent to /dev/null
This commit is contained in:
Ludovic Rousseau 2012-07-30 11:01:04 +02:00
parent 081316ec5c
commit 99aa8e334b

View File

@ -376,7 +376,7 @@ __jobcount_color()
{
local running=$(jobs -r | wc -l | tr -d " ")
local stopped=$(jobs -s | wc -l | tr -d " ")
local screens=$(screen -ls | grep -c Detach )
local screens=$(screen -ls 2> /dev/null | grep -c Detach )
if [ $running != "0" -a $stopped != "0" -a $screens != "0" ] ; then
rep="${NO_COL}${YELLOW}${screens}s${NO_COL}/${YELLOW}${running}r${NO_COL}/${LIGHT_YELLOW}${stopped}t${NO_COL}"