From 5aa17c3328cda5e16c232fab0cd124ced977c5dd Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 19 Jan 2019 14:16:36 -0500 Subject: [PATCH] Don't return failed exit code when $_ZL_ECHO is unbind Using the "&&" operator returns the exit code of the first failed command, and when $_ZL_ECHO is unbind always return 1. --- z.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/z.lua b/z.lua index e1b23b7..e760069 100755 --- a/z.lua +++ b/z.lua @@ -1311,7 +1311,9 @@ _zlua() { else $_ZL_CD "$dest" fi - [ -n "$_ZL_ECHO" ] && pwd + if [ -n "$_ZL_ECHO" ]; then + pwd + fi fi fi }