PowerShell 7 is the latest version of PowerShell, and it brings many new features and enhancements that make it an attractive choice for developers and system administrators alike.
One of its most useful features is the auto-complete feature, which can save you time and reduce typing errors. In this article, we'll show you how to add the auto-complete feature using PowerShell 7 in Visual Studio Code (VS Code).
How it works?
Actually there is no AI or magic, but this terminal auto completes based on bash history and tries to auto complete the command you used most frequently.
Step 1: Install PowerShell 7:
First, you'll need to install PowerShell 7 on your system. You can download the latest version from the official PowerShell website. Once downloaded, install it by following the installation wizard.
Supported versions of windows
Step 2: Add PowerShell 7 in VS Code
{
"terminal.integrated.defaultProfile.windows": "PowerShell 7",
"terminal.integrated.profiles.windows": {
"Command Prompt": {
"args": [],
"icon": "terminal-cmd",
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
]
},
"Git Bash": {
"source": "Git Bash"
},
"PowerShell": {
"icon": "terminal-powershell",
"source": "PowerShell"
},
"PowerShell 7": {
"args": [],
"icon": "terminal-powershell",
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
}
},
}
Note: Path may vary if you have choose different installation location. Here I followed all the default settings while installing
We added new profile PowerShell 7 in terminal and set as default one.
Results:
Top comments (5)
Thank you so much, it works
So usefull thank you so much, it worked perfectly ^^
It worked. Thanxπ
Where am i supposed to put the code?
VSCode settings.json file