Read command gets lost when using arrows in Mingw

Asked

Viewed 35 times

2

I need to read a command line information. Here at work we use the Mingw that comes shipped on Sourcetree.

For such a need, I tried to use the function built-in of read, but it does not behave very well if I need to correct the typed text using the arrows.

For example, if I want to type add, but I accidentally typed in asd. I sail a house to the side <=, give a Backspace and then type d. When I have the variable displayed, on the other hand... it gets messy. See gif:

confusão ao ler a variável

I also redirected to a file and got it when opening with VIM:

arquivo aberto pelo VIM

So how can I read from the command line without having this unforeseen behavior when using the arrows?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.