Windows Terminal

I have been testing out all sorts of terminal applications on Windows like CmEMU, GitBash, CMDer and many others and frankly, working inside it with Elixir leaves a lot to be desired from working in Terminal on MacOS and Linux.

Now Microsoft has release a pretty cool Windows Terminal, and working in iex is exactly the same. No tab complete, no formatting to speak of, no colors. This is such a big feature of working in IEX.

Is there a push or interest in making the Windows Terminal more useful, or is there some switch or configuration that I am missing?
iex-powershell iex-terminal

The various Bashes for Windows should work. At least color.

Another thing you can try is to use the --werl switch. It will open a separate window.

Tab complete and colors work for me on the new windows terminal. I just installed it.
Tab and colors also work with the old wsl/ubuntu/cmd terminal and hyper.

Hyper is heavy on the memory but here is the link in case you haven’t seen it. https://hyper.is

Edit: Colors and tab works with WSL but not with native elixir with command prompt/cmd for me.

Wow… A stripped down chrome(ium) just to display some textual information… Yes, that one needs a lot of memory for sure…

I’m pretty sure there are a lot of alternatives that’d work as well as hyper and use a lot less memory…

2 Likes

I used Hyper.js + git bash + elixir installed on windows at first and it can’t use tab to auto complete in iex
after I switch to Window Terminal + WSL (ubuntu) + elixir installed inside WSL everything works fine, not seeing any issue now.

In CMD you can just do this:

iex.bat --werl -S mix

It opens a new window which has tab completion at least. Colors though, no.

1 Like

This does not TAB complete

Did you do anything? Did you run IEX through a bash linux shell ? I wasn’t clear on this, but this should work on windows command line interfaces like new terminal in cmd and powershell.
That it works under Linux subsystem is not what I am after

For me it has tab completion working though. Strange.

CMD and Powershell work fundamentally different from the emulators or TTYs you’d use under Linux. That’s why the --werl workaround has been created by the Erlang folks. If it doesn’t work for you, then something is different with your setup from that of everyone else.

I’m not able to get colors and tabbing working outside of WSL except when the command iex.bat --werl is ran from command prompt/cmd. Only tabs work for me with iex.bat --werl not colors.

Same. But I don’t think colors were promised there.

1 Like

Can the new terminal be used inside visual studio code?

I tried with the setting terminal.integrated.shell.windows": "wt.exe", but that loads terminal in a new windows and not within VSC.

@zorglubb Please refer to Autocomplete in IEx broken (on Windows) · Issue #4103 · elixir-lang/elixir · GitHub

There’s a configuration section in the docs on how to setup custom shells. For your specific case, maybe it’s missing the full path?

No, full path doesn’t change the behaviour. New terminal gets opened in a new window.

window terminal is the UI for executing bash
same for visual studio code terminal, it’s a UI
so you don’t expect to have UI in another UI
what’s important is the executable in it

But isn’t cmd.exe also an UI? That works inside.

@Nefcairon Maybe reporting that on vscode’s Github could help?