Skip to content

PowerShell/command-not-found

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

command-not-found

The command-not-found module is a feedback provider plugin for PowerShell. This feedback provider depends on the command-not-found utility, which is often available on Linux by default, to provide suggestions when a native command cannot be found.

bash also calls the command-not-found utility to provide suggestions when a command cannot be found. But this feedback provider plugin does more than that, thanks to the command-line predictor feature in PowerShell. It also implements the ICommandPredictor interface and serves as a predictor. When the resulted feedback contains actionable items, such as commands to run, they will be used as predictive suggestions to streamline the user's command-line experience.


FeedbackProvider

Requirements

The command-not-found plugin is built on the IFeedbackProvider interface, which is available with PowerShell 7.4.0-preview.2 or above. To display prediction suggestions from the command-not-found, you need PSReadLine 2.2.6 or above.

  • PowerShell 7.4.0-preview.2 or above
  • PSReadLine 2.2.6 or above

Documentation

PowerShell feedback providers and predictors are written in C# and registered with the PowerShell Subsystem Plugin Model. To learn more, see "How to create a feedback provider" and "How to create a command-line predictor".

Build

Make sure the latest .NET 8 SDK is installed and available in your PATH environment variable. Run .\build.ps1 from pwsh to build the project. The module will be published to .\bin\command-not-found by a successful build.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published