У меня следующий скрипт bash
while read -r line; do
FILEPATH=$(echo $line | cut -d : -f 1)
L=$(echo $line | cut -d : -f 2)
C=$(echo $line | cut -d : -f 3)
TYPE=$(echo $line | cut -d : -f 4 | cut -c 2-)
MESSAGE=$(echo $line | cut -d : -f 5 | cut -c 2-)
DESCRIPTION=$(echo $line | cut -d : -f 6 | cut -c 2-)
if [ "$TYPE" == 'error' ]; then
printf "\n \e[31m$TYPE\e[39m\n"
else
printf "\n \e[33m$TYPE\e[39m\n"
fi
printf " \e[90m$FILEPATH:$L:$C\e[39m\n"
printf " $MESSAGE - $DESCRIPTION\n"
done <<< "$RESULT"
В терминале цвета работают отлично.
Как скрыть цвета в Xcode & Source Tree?
![enter image description here](https://i.stack.imgur.com/PkjUo.png)
![enter image description here](https://i.stack.imgur.com/Rz8IR.png)
![enter image description here](https://i.stack.imgur.com/AquqR.png)