Skip to content

Instantly share code, notes, and snippets.

@jgentes
Last active September 28, 2025 18:26
Show Gist options
  • Select an option

  • Save jgentes/534714b3b1ad239a31bc220918429ae5 to your computer and use it in GitHub Desktop.

Select an option

Save jgentes/534714b3b1ad239a31bc220918429ae5 to your computer and use it in GitHub Desktop.
powershell autocomplete
# --- PowerShell profile (~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1)
Import-Module posh-git -ErrorAction SilentlyContinue
Import-Module PSReadLine
# Predictions visible but non-intrusive
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle InlineView
Set-PSReadLineOption -EditMode Windows
# Tab = filesystem/path completion (like Bash)
Set-PSReadLineKeyHandler -Key Tab -Function Complete
# Shift+Tab = cycle via menu if you want choices
Set-PSReadLineKeyHandler -Key Shift+Tab -Function MenuComplete
# Accept only the next *word* of a suggestion with Alt+RightArrow (keeps RightArrow normal)
Set-PSReadLineKeyHandler -Key Alt+RightArrow -Function AcceptNextSuggestionWord
# Optional: quick jump to your dev drive
Set-Location -Path 'D:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment