An open API service indexing awesome lists of open source software.

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.

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}
```