# Base.run and ansi colours

**URL:** <https://discourse.julialang.org/t/base-run-and-ansi-colours/69611>\
**Category:** General Usage\
**Created:** [October 12, 2021, 9:36am UTC](https://discourse.julialang.org/t/base-run-and-ansi-colours/69611 "2021-10-12T09:36:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gleyland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gleyland/32/15339_2.png) [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Post date:** [October 12, 2021, 9:37am UTC](https://discourse.julialang.org/t/base-run-and-ansi-colours/69611/1 "2021-10-12T09:37:00Z")

</div>

Hi,

Recently, ansi colours haven’t been working for me (using the git bash shell in VSCode). I thought it might be VSCode, but I’m starting to wonder if it’s Julia (I’m using 1.6.3). I think it might be related to `Base.run`:

```julia
$ julia -e 'println("\33[1;31mhello\33[0m")'
hello

```

(where the “hello” is in red)

but

```julia
$ julia -e 'run(`true`); println("\33[1;31mhello\33[0m")'
←[1;31mhello←[0m

```

It seems to be Julia, rather than git bash or VSCode which I originally suspected, because:

```julia
$ python -c "import os; os.system('true'); print('\33[1;31mhello\33[0m')"
hello

```

where, again, “hello” is in red.

Any ideas what I might be doing wrong? I couldn’t find any previous mention of the issue here or on github. Thanks!

---

<div class="post-metadata">

**Author:** ![gleyland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gleyland/32/15339_2.png) [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Post date:** [October 27, 2021, 6:19pm UTC](https://discourse.julialang.org/t/base-run-and-ansi-colours/69611/2 "2021-10-27T18:19:49Z")

</div>

Hi,

I thought I’d give an update on this: it’s not fixed it 1.7.0 rc2. I also [posted on Stackoverflow](https://stackoverflow.com/questions/69669962/windows-10-git-bash-julia-base-run-and-no-ansi-color), and got a confirmation that I’m not the _only_ one with this problem.

In summary, the problems seems to be that on some versions of windows, if you run a “git bash” command (eg `/bin/true`) from Julia with `Base.run`, you break subsequent terminal coloring.

- The equivalent in Python doesn’t break coloring
- coloring breaks in both git bash and cmd.exe shells
- running a “windows” executable from `Base.run` does not break coloring
- this doesn’t seem to happen for everyone, so it may be a windows version problem (I have Windows 10 19042)

I’d be grateful for any insight!
