https://github.com/AnderssonPeter/PowerType
Autocomplete for PowerShell
https://github.com/AnderssonPeter/PowerType
autocomplete cli completions powershell prediction suggestion terminal
Last synced: 11 days ago
JSON representation
Autocomplete for PowerShell
- Host: GitHub
- URL: https://github.com/AnderssonPeter/PowerType
- Owner: AnderssonPeter
- License: mit
- Created: 2021-11-16T08:16:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T21:12:34.000Z (almost 2 years ago)
- Last Synced: 2024-11-04T21:37:12.372Z (5 months ago)
- Topics: autocomplete, cli, completions, powershell, prediction, suggestion, terminal
- Language: PowerShell
- Homepage:
- Size: 8.59 MB
- Stars: 140
- Watchers: 6
- Forks: 9
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - AnderssonPeter/PowerType - Autocomplete for PowerShell (PowerShell)
README
[](https://asciinema.org/a/458149?autoplay=1)
- [Installation](#installation)
- [Requirements](#requirements)
- [Auto enable in every session](#auto-enable-in-every-session)
- [Upgrade](#upgrade)
- [Uninstall](#uninstall)
- [Troubleshooting](#troubleshooting)
- [Progress](#progress)
- [Contribute](#contribute)
- [Acknowledgements](#acknowledgements)[](https://www.powershellgallery.com/packages/PowerType)
[](https://www.powershellgallery.com/packages/PowerType)
[](https://github.com/AnderssonPeter/PowerType/blob/main/LICENSE.md)[](https://github.com/AnderssonPeter/PowerType/actions/workflows/test.yml)
[](https://anderssonpeter.testspace.com/spaces/156585/result_sets)
[](https://coveralls.io/github/AnderssonPeter/PowerType)
[](https://sonarcloud.io/project/issues?id=AnderssonPeter_PowerType&resolved=false&types=CODE_SMELL)# Installation
It's not feature complete yet but if you want to try it out run the following:
```PowerShell
Install-Module PowerType -AllowPrerelease
Enable-PowerType
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView # Optional
```If you now type `git` you should get autocompletion, the [dictionary for git](PowerType/Dictionaries/git.ps1) is far from complete and doesn't know about all commands and parameters yet.
## Requirements
Ensure that you are running `PowerShell 7.2` and `PSReadLine 2.2.0-beta4` or newer!
## Auto enable in every session
Open your `PowerShell Profile` by running `notepad $Profile` and add the following:
```PowerShell
Enable-PowerType
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView
```## Upgrade
```Powershell
Disable-PowerType
Remove-Module PowerType
Install-Module PowerType -AllowPrerelease -Force
```
Restart powershell## Uninstall
```Powershell
Disable-PowerType
Remove-Module PowerType
Uninstall-Module PowerType
```# Troubleshooting
```PowerShell
Get-PowerTypeStatus # To see if the background service is running as intended
Get-PowerTypeHistory # Used to see if any suggestions caused a exception
```# Progress
[](https://github.com/AnderssonPeter/PowerType/milestone/1)
[](https://github.com/AnderssonPeter/PowerType/milestone/2)
[](https://github.com/AnderssonPeter/PowerType/milestone/3)
[](https://github.com/AnderssonPeter/PowerType/milestone/4)This project is far from done but has the aim to provide autocomplete for common cli tools like [git](PowerType/Dictionaries/git.ps1), [npm](PowerType/Dictionaries/npm.ps1), [adb](PowerType/Dictionaries/adb.ps1), docker, dotnet, node and many more while using powershell.
# Contribute
If you wish to contribute the following would be greatly appreciated
* Give this repository a Star
* Spread the word
* Create a pull request with a new Dictionary (See [npm](PowerType/Dictionaries/npm.ps1) for a simple example)
* Sponsor using the button above (Only do this if you can afford it)# Acknowledgements
This is heavily inspired by [Fish shell](https://fishshell.com/) and [fig autocomplete](https://github.com/withfig/autocomplete), some dictionaries are generated from the specifications in [Carapace-bin](https://github.com/rsteube/carapace-bin/) big thanks to [rsteube](https://github.com/rsteube) for his patience and help!