https://github.com/HoussemDellai/powershell-autocomplete
Configures powershell to auto-complete commands based on the history
https://github.com/HoussemDellai/powershell-autocomplete
Last synced: 5 months ago
JSON representation
Configures powershell to auto-complete commands based on the history
- Host: GitHub
- URL: https://github.com/HoussemDellai/powershell-autocomplete
- Owner: HoussemDellai
- Created: 2023-07-17T12:35:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-17T12:36:27.000Z (over 1 year ago)
- Last Synced: 2024-11-21T07:17:07.896Z (5 months ago)
- Size: 1000 Bytes
- Stars: 13
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - HoussemDellai/powershell-autocomplete - Configures powershell to auto-complete commands based on the history (Others)
README
# powershell-autocomplete
Configures powershell to auto-complete commands based on the history```powershell
$powershellProfile=@"
# 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 HistorySearchForwardImport-Module posh-git
Import-Module PSReadLine
Set-PSReadLineOption -colors @{ Default = "Green"}
Set-PSReadLineOption -colors @{ Parameter = "Blue"}
Set-PSReadLineOption -colors @{ Command = "Magenta"}function prompt {
" $ "
}Import-Module Terminal-Icons
Clear
pwd
"@
$powershellProfile > $PSHOME\Profile.ps1
```