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
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
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?). ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









