spapas

spapas

Hello friends, I have a problem when using mix with windows cmd (latest erl+elixir).

I open a command line and run mix. After that, whenever I press up arrow (to get the prev cmd) I see ^[[A instead (notice that I get similar behavior with all arrow keys i.e I get ^[[A^[[B^[[D^[[C for up down left right).

If I run chcp on the same cmd it fixes the behavior and the arrows work again. But when I run mix again, it breaks again! Notice that I get the same behavior elixir x. Running iex works fine. Also please notice that if I run elixir (without parameters) the up arrow works. It only breaks If I pass a parameter to it (that’s what mix.bat also does).

This may be related with this Elixir + Erlang on Windows 11 terminal error - #2 by BradS2S ?

Please please please don’t answer me about powershell or wsl. I know these solutions exist but my workflow uses cmd and I want to keep using that.

Thank you.

Showing Posts 1 to 6

spapas

spapas OP

In case other friends have the same problem, and until this is fixed:

You can create a file named mix.bat on the root folder of your elixir project with the following contents:

@echo off
set "NoDefaultCurrentDirectoryInExePath=0"
call mix.bat %*
chcp > NUL
set "NoDefaultCurrentDirectoryInExePath="

after that you should be able to run mix and the up arrow won’t break :slight_smile:

cmo

cmo

Looks like an OTP bug. If you run erl and then quit the same thing happens.

spapas

spapas OP

If I run erl (using Erlang/OTP 26 [erts-14.1.1]) the up arrow works both on the erlang interpreter and If i quit (using double ctrl+c). However if I quit using ctrl+c and then a (abort) the up arrow breaks (!)

cmo

cmo

quitting by quit() also does it

garazdawi

garazdawi

Erlang Core Team

I think this is the same issue as reported here: Erlang 26 breaks command line on Windows · Issue #7621 · erlang/otp · GitHub

If so, it will be fixed in 26.2.

If you want to try it out before it is released you can download an windows installer from the maint githubactions artifacts. For example here: https://github.com/erlang/otp/actions/runs/6689002396

spapas

spapas OP

Hey @garazdawi that seems to be the one, thank you!

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews