thiagomajesk

thiagomajesk

No ANSI colors for Powershell or CMD inside iex

Hi, I have been experiencing some problems using on Windows regarding iex output coloring.
Since I’ve been using CMDER as my main console for some time, I only noticed this problem today trying to use iex through Visual Studio Code’s integrated terminal.
After searching a lot about this, I was unable to find the right cause or solutions to this problem, so I don’t know if this is a problem on the REPL by itself or at the OS level, so I was hoping someone could help me with that.

This is what I’m getting using this config on my .iex.exs:

Application.put_env(:elixir, :ansi_enabled, true)

IEx.configure(
	colors: [
		enabled: true, 
		eval_result: [:cyan, :bright], 
		eval_info: [:blue, :bright],
		eval_error: [:magenta, :bright],
		doc_title: [:reverse, :yellow, :bright],
		doc_headings: [:yellow, :bright],
		doc_inline_code: [:magenta, :bright],
		ls_directory: [:green, :bright],
		stack_app: [:green, :bright],
		stack_info: [:red, :bright]
		]
)

Powershell, CMD and CMDER (Powershell)

Most Liked

NobbZ

NobbZ

Windows command line and Powershell simply are not capable of ANSI. They do understand another set of commands though, which is not implemented in elixir so far.

Last Post!

OvermindDL1

OvermindDL1

Well getting a NIF built and then just googl’ing for the command needed to call into the winapi might be useful for those people, just prebuild it for them since they often don’t have a full C building environment set up and then it should ‘just work’ (might need to auto-select 32-bit or 64-bit depending?). :slight_smile:

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42158 114
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement