You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arrow keys don't work in Ubuntu Bash on Windows #10163
bugIssue identified by VS Code Team member as probable bugterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededwindowsVS Code on Windows issues
Bind bash.exe path to integrated shell ("terminal.integrated.shell.windows": "C:\Windows\sysnative\bash.exe")
Open terminal by Ctrl-Shift-~
Type a command: echo hello world
Use up arrow to find the command in history (doesn't work)
This works in the new stand-alone bash terminal. This also works on a mac. Just not vsc.
Reacted by Tally Barak, Diego Jara, Andrew Harper, Antonin Cezard, G. P. Müller, Aodhagán Collins, Ryan Petschek, Konstantin Vyatkin, Alex and orlando-oli
I can't believe that this one is still not working. I submitted this back and August. How long does it take to support a simple history buffer? The native shell (Win10 bash) works, why not vsc?
just want to chime in ;). The Developer of ConEmu, Maksim Moisiuk (@Maximus5), has come up with a workaround for this issue. It might be worth it to look at what he did. :)
There is a simple workaround for using the history: Use the bash commands which use the Ctrl key! Yes, bash has those, but most people forgot their existence, it seems.
Ctrl+P: Previous command (like up arrow)
Ctrl+N: Next command (like down arrow)
Ctrl+B: One character backwards (like left arrow)
Ctrl+F: One character forwards (like right arrow)
Ctrl+A: Start of line (like home key)
Ctrl+E: End of line (like end key)
Ctrl+D: Delete character (like delete key)
There is just one small issue: Ctrl+P (arguably one of the most important commands) is usually executed by VSCode to show "Quick Open". There are three ways to solve this: You could reassign the "previous-history" command in bash, reassign the "workbench.action.quickOpen" command in VSCode, or - arguably the easiest solution - change your "terminal.integrated.commandsToSkipShell" setting in VSCode to exclude "workbench.action.quickOpen" (you would then have to move focus away from the terminal to have VSCode respond to Ctrl+P).
Reacted by Alex, Hirofumi Horikawa and Daniel Imms
Good to hear that it's fixed in the insiders build. Perhaps I can encourage some Apple fanboys to develop on windows not we have all the Unix CLI tools built in.
bugIssue identified by VS Code Team member as probable bugterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededwindowsVS Code on Windows issues
Activity
phfsantos commentedon Aug 5, 2016
I am also having the same issue. It does not work on version 1.4 neither.
Arrows left and right also not working.
vrabcak commentedon Aug 6, 2016
It is related to microsoft/WSL#111
Tyriar commentedon Aug 8, 2016
Tomas Tichy (@vrabcak) thanks a bunch for pointing this issue out!
[-]Bash terminal history up/down arrows not working[/-][+]Arrow keys don't work in Ubuntu Bash on Windows[/+]cybrown commentedon Sep 23, 2016
For those using bash for windows in vscode and cannot wait to use the history, here are some usefull commands involving the bang character when arrow keys are not available: http://ss64.com/bash/bang.html
u84six commentedon Oct 9, 2016
I can't believe that this one is still not working. I submitted this back and August. How long does it take to support a simple history buffer? The native shell (Win10 bash) works, why not vsc?
Tyriar commentedon Oct 9, 2016
u84six as mentioned above, this is an upstream issue microsoft/WSL#111
longtomjr commentedon Oct 14, 2016
just want to chime in ;). The Developer of ConEmu, Maksim Moisiuk (@Maximus5), has come up with a workaround for this issue. It might be worth it to look at what he did. :)
Tyriar commentedon Oct 14, 2016
Herman (@longtomjr) thanks for the tip, info here:
12 remaining items
wclr commentedon Dec 15, 2016
The same problem here when working with docker container's bash session:
docker-compose exec container-name bashCherryDT commentedon Dec 28, 2016
There is a simple workaround for using the history: Use the bash commands which use the Ctrl key! Yes, bash has those, but most people forgot their existence, it seems.
Ctrl+P: Previous command (like up arrow)
Ctrl+N: Next command (like down arrow)
Ctrl+B: One character backwards (like left arrow)
Ctrl+F: One character forwards (like right arrow)
Ctrl+A: Start of line (like home key)
Ctrl+E: End of line (like end key)
Ctrl+D: Delete character (like delete key)
For details, see http://www.gnu.org/software/bash/manual/html_node/Bindable-Readline-Commands.html#Bindable-Readline-Commands
There is just one small issue: Ctrl+P (arguably one of the most important commands) is usually executed by VSCode to show "Quick Open". There are three ways to solve this: You could reassign the "previous-history" command in bash, reassign the "workbench.action.quickOpen" command in VSCode, or - arguably the easiest solution - change your "terminal.integrated.commandsToSkipShell" setting in VSCode to exclude "workbench.action.quickOpen" (you would then have to move focus away from the terminal to have VSCode respond to Ctrl+P).
horihiro commentedon Dec 30, 2016
I tried wslbridge to use arrow keys on terminal, and I successed.
NOTICE: you can NOT use an environment variable (i.e. %USERNAME%) in User Settings, you have to replace to your username.
Tyriar commentedon Jan 3, 2017
Hirofumi Horikawa (@horihiro) good to know you got this working that way as a temporary work around 👍
u84six commentedon Jan 20, 2017
Does closing this mean that it's fixed? What do I have to update to fix this problem because it's still not working.
Tyriar commentedon Jan 20, 2017
u84six it's fixed in the Insiders build which you can test here, it should included in v1.9.0 in ~2 weeks time.
khards commentedon Feb 27, 2017
Good to hear that it's fixed in the insiders build. Perhaps I can encourage some Apple fanboys to develop on windows not we have all the Unix CLI tools built in.
gengxuelei commentedon Mar 22, 2017
when type 'blank' or 'tab' ,there is a wrong blank space,use 'cat sth.txt',repeat this bug
Uplevel to [email protected]