cd C:\vcpkg
.\vcpkg integrate powershell
Adding the following line to C:\Users\user\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:
Import-Module 'C:\vcpkg\scripts\posh-vcpkg'
Successfully added posh-vcpkg to your PowerShell profile. Please start a new Powershell window for the changes to take effect.
Start a new powershell 5.1
.\vcpkg install libf<press tab>
Autocomplete not working on a new powershell session. So I manually type
Import-Module 'C:\vcpkg\scripts\posh-vcpkg'
Now enter vcpkg command again
.\vcpkg install libf<press tab>
Autocomplete is working after manual input Import-Module
But if I start a new powershell-core 6.0 (in downloads\tools),
.\vcpkg install libf<press tab>
Autocomplete is working immediately on new session.
Use Windows built-in powershell 5.1
Assume vcpkg is in
C:\vcpkg
Start a new powershell 5.1
Autocomplete not working on a new powershell session. So I manually type
Now enter vcpkg command again
Autocomplete is working after manual input
Import-Module
But if I start a new powershell-core 6.0 (in
downloads\tools
),Autocomplete is working immediately on new session.