Skip to content

Commit e048a03

Browse files
committed
Preserve whitespace in output on program non-zero exit
1 parent cf6a6a5 commit e048a03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HookFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ function %%function_name%% {
3434
export COMP_LINE COMP_POINT COMP_WORDBREAKS;
3535
local RESULT STATUS;
3636
37-
RESULT=`%%completion_command%%`;
37+
RESULT="$(%%completion_command%%)";
3838
STATUS=$?;
3939
4040
# Bail out if PHP didn't exit cleanly
4141
if [ $STATUS -ne 0 ]; then
42-
echo $RESULT;
42+
echo -e "$RESULT";
4343
return $?;
4444
fi;
4545
@@ -72,7 +72,7 @@ function %%function_name%% {
7272
7373
# Bail out if PHP didn't exit cleanly
7474
if [ $STATUS -ne 0 ]; then
75-
echo $RESULT;
75+
echo -e "$RESULT";
7676
return $?;
7777
fi;
7878

0 commit comments

Comments
 (0)