From a7657ec622632b14f2b543cb6af961a985a28458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Wed, 9 Jul 2014 22:50:05 +0200 Subject: [PATCH] Fix _lp_bool --- liquidprompt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/liquidprompt b/liquidprompt index cfa67fb..9d53fec 100755 --- a/liquidprompt +++ b/liquidprompt @@ -104,7 +104,11 @@ fi _lp_bool() { local res=${2:-$?} - [[ $res = 0 ]] && eval $1=true || eval $1=false + if [[ $res = 0 ]]; then + eval $1=true + else + eval $1=false + fi return $res }