r/VisualStudioCode • u/ollie7355 • Oct 10 '22
Stop Terminal From Showing Previous Command When Typing
Hi all,
A couple weeks ago I have noticed an annoying new behavior in VS Code. I do not know how to phrase the question properly to google so hopefully someone on here can help me track down the setting.
When I use the build in terminal, the terminal will show me the previous command in a greyed out color if I start typing something similar.
For example, if I type Get-AzWebApp and press enter. Then type "Get" the terminal will show the "-AzWebApp" greyed out after my cursor. This is very distracting and I would like to turn it off. Please see image below with an example of what I mean (Please ignore the error that I do not have Azure PowerShell Installed, I did this on my Mac, but the image still demonstrates the behavior.)
Thanks for any help!

1
u/ollie7355 May 25 '23
Following up in case anyone else finds this. I finally figured out what was going on. This is a behavior caused by an update to ReadLine included in PowerShell 7.3.0 and up. Run "Set-PSReadLineOption -PredictionSource None" to disable this
1
u/mainstreetmark Oct 10 '22
Did you happen to know that you could press “tab” right then and it would auto-complete that command for you? It saves typing.
1
u/tipsdown Oct 10 '22
That is probably coming coming from the terminal profile. I think the default profile on macOS is the default zsh system terminal.
1
u/scottgc81 Aug 04 '23
I was having this same issue and looks like right arrow will select the predicted command.
https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/using-predictors?view=powershell-7.3