https://github.com/krymtkts/snippetpredictor
A command-line predictor written in F# that suggests code snippet based on the input.
https://github.com/krymtkts/snippetpredictor
fsharp powershell powershell-module predictor
Last synced: 12 months ago
JSON representation
A command-line predictor written in F# that suggests code snippet based on the input.
- Host: GitHub
- URL: https://github.com/krymtkts/snippetpredictor
- Owner: krymtkts
- License: mit
- Created: 2025-02-10T05:26:49.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T11:44:20.000Z (12 months ago)
- Last Synced: 2025-02-26T12:33:39.859Z (12 months ago)
- Topics: fsharp, powershell, powershell-module, predictor
- Language: F#
- Homepage:
- Size: 146 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SnippetPredictor
This project is based on this article.
[How to create a command-line predictor - PowerShell | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/create-cmdline-predictor?view=powershell-7.4)
## Usage
```powershell
# PredictionSource = HistoryAndPlugin required.
Get-PSReadLineOption | Select-Object PredictionSource
#
# PredictionSource
# ----------------
# HistoryAndPlugin
dotnet publish -c Release
Import-Module .\bin\SnippetPredictor\SamplePredictor.dll
# Confirm SamplePredictor loaded.
Get-PSSubsystem -Kind CommandPredictor
#
# Kind SubsystemType IsRegistered Implementations
# ---- ------------- ------------ ---------------
# CommandPredictor ICommandPredictor True {Windows Package Manager - WinGet, SnippetPredictor}
```