Recently I updated my PowerShell to version 7.3.0 and when typing it shows suggestions. But when I press the Tab key it doesn't autocomplete the suggestion. How to set the Tab
as the autocompletion key?
How to change the Suggestion completion key on Powershell 7.3.0?
2.3k views Asked by Nirmal Code At
2
So after doing some research I found out,
RightArrow
key.InlineView
andListView
by pressingF2
Source: Using predictors in PSReadLine
So here's how to change key bindings
Set
Tab
key as the keybinding for auto complete (AcceptSuggestion)Set
RightArrow
key as the keybinding for accepting the next word in the suggestion (ForwardWord)Note :
You need to run these each time you open a new session. To avoid that add these to
profile.ps1
file. More on ProfilesTo change these just for the current user,
Open a PowerShell window and run,
OR
To change these for all users,
Open a PowerShell window with
Run as Administrator
and run,If the file doesn't exist, create a new one.
Add these lines and save.