Can't use arrow keys in Git Bash (Windows)
Asked Answered
O

10

18

I am trying to setup semantic UI in my repository and for some reason I can't use the arrow keys to select menu options in Git Bash.

enter image description here

Press down or up only moves my cursor, it doesnt move the > icon that selects the correct menu option.

Oneil answered 18/4, 2019 at 20:15 Comment(0)
C
14

You can use Visual Studio Code terminal and it works.

Campbellbannerman answered 4/7, 2019 at 11:6 Comment(3)
What the heck, I still use Git Bash for Windows in VS Code, but it works perfectly inside VS Code. Weird, thanks.Turkoman
Yea git bash worked in VS code somehow xDWende
It works in Windows Terminal with a Git Bash instance for those of us not using VSCode but a stand-alone terminal outside of an IDE/text editor.Vidovic
H
10

delete the close angle bracket (>) symbol to unselect, type > to select, press enter

Halt answered 18/4, 2020 at 4:39 Comment(2)
what does delete the symbol mean?Udine
@ZahanSafallwa in question, on provided screenshot, you have an arrow ">" pointing to the selected option. It should be deletedKaylyn
S
8

Git bash doesn't support an interactive terminal.

Use the regular windows terminal or powershell

Sturges answered 14/5, 2020 at 5:55 Comment(1)
I opened Windows Terminal and opened a Git Bash instance in that and it allowed me to use the arrow keys to select, but in straight up Git Bash terminal it wouldn't work ... ! It's a crazy world.Vidovic
G
5

Adding export MSYS=enable_pcon to ~/.bashrc worked for me. Now, it not only makes arrow movement visible but also displays text styled in the command properly.

https://github.com/git-for-windows/git/issues/3657#issuecomment-1028037890

enter image description here

Glans answered 24/12, 2023 at 6:14 Comment(1)
This actually worked for me (the exact command requiring arrow selection was npx create-nx-workspace@latest mytestngapp --preset=angular-standalone.Benzoin
S
1

Try using git bash inside vscode

Sulcate answered 13/5, 2021 at 14:6 Comment(1)
The question didn't mention their problem in the context of a vscode issue, so suggesting to use vscode doesn't shed light on the reason for the OPs problem.Faruq
H
1

Hey man its been a while, but I literally just ran into this issue. the solution for me was to manually delete and type > or use gitbash in VSC integrated terminal mode

I chose to do the latter.

Herd answered 7/9, 2021 at 7:37 Comment(1)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question.Minuet
B
0

Solution for me:
In webstorm console everything is working correctly, after changing eslint.

Bolen answered 26/1, 2020 at 9:14 Comment(0)
E
0

TO AVOID THESE STEPS OPEN BASH IN VSCODE OR USE DIFFERENT TERMINAL. IF YOU DON'T WISH TO AVOID THE PROBLEM THESE ARE THE FOLLOWING STEPS TO GET IT TO WORK:

When in Git bash and prompted for an answer by arrow key selection. You have to first type '>' and look at what line it typed on(usually the first line).

Git Bash Console

The goal is to get that greater than symbol on the current line selected. In my case I had to press the down arrow to get it on the 'apps' selection line. If it is on the wrong line just backspace to remove it and arrow up/down and try again. Once on the current selection line to delete the current selection hold backspace and it will delete the '>' symbol you typed and some letters and invisibly should go all the way to the beginning of the line.

enter image description here

Then once you think you've held the backspace long enough, go to the line you wish to select by tapping down arrow key. Then type the greater than symbol on the line you wish to select and press enter.

enter image description here

As you can see my symbol is on the angular line. Then I press enter and it should select that line.

enter image description here

And so it does but not without a weird blank formatting block but I don't mind that.

Ephesus answered 19/5, 2022 at 13:48 Comment(0)
F
0

The select option is working in Windows PowerShill.

Fragmentary answered 9/7, 2022 at 13:48 Comment(0)
W
0

Use the arrow-keys anyway, you will not see it visually, but you can still choose the option after pressing ENTER.

Widescreen answered 21/7 at 9:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.