joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.16k stars 27 forks source link

Fix: prevent prefix color change #119

Closed ras0q closed 1 month ago

ras0q commented 1 month ago

In main branch, when the output is colorized, xc' prefix is affected by that color. This PR fixes this issue.

Reproduction

README.md

# Tasks

## color

```bash
echo -e "\e[31m RED \n RED2 \e[m"


![image](https://github.com/user-attachments/assets/55add0ee-155b-458c-9d26-4bd5710e44a5)
joerdav commented 1 month ago

Thanks, I'm happy with this implementation, I'd just like to test it on a few different platforms to be sure that it works as expected.

ras0q commented 1 month ago

I've checked on sh, bash, fish, and pwsh (PowerShell 7). As far as I can see from the source code, commands is basically executed in bash, right? I think if you write the correct bash command, it will color correctly.