# Run the new pwrsh.exe as admin
# https://github.com/PowerShell/powershell/releases
# Install aucomplete addon
Install-Module -Name PSReadLine -AllowPrerelease
# Open the profile with an editor (e.g. Notepad)
notepad $PROFILE
# *If it throws an error, create the file:
New-Item -Path $PROFILE -Type File -Force
# Paste into file:
# Make addon listen to history
Set-PSReadLineOption -PredictionSource History
# Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Autocompletion for arrow keys
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
# Restart the powershell with new data:
. $PROFILE
Powershell comes with a default basic autocomplete.
Ctrl + Spacebar
You can use the arrow keys to navigate the options.
# Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Autocompletion for arrow keys
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
# Create profile when not exist
if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) {
New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force
}
# Open the profile with an editor (e.g. good old Notepad)
ii $PROFILE.CurrentUserAllHosts
# Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Notepad $profile