From 99aa8e334b6adc81c2c25b0421658c137f867528 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Mon, 30 Jul 2012 11:01:04 +0200 Subject: [PATCH] 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 --- liquidprompt.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidprompt.bash b/liquidprompt.bash index 3e0e8a2..b6d2591 100755 --- a/liquidprompt.bash +++ b/liquidprompt.bash @@ -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}"