WinGet.CommandNotFound PowerShell module now released

    WinGet.CommandNotFound PowerShell module now released

    WinGet.CommandNotFound PowerShell module now released


    Posted: 21 May 2024

     Microsoft DevBlogs:

    We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions.

    This module was originally incubated as a utility in PowerToys. Thanks to the help of the PowerShell and PowerToys community, we got lots of positive feedback to turn this PowerToys utility into a real PowerShell module! 🙂



    Requirements

    The Microsoft.WinGet.CommandNotFound module is built on the IFeedbackProvider interface, which is available with PowerShell 7.4.0-preview.2 or above. To display prediction suggestions, you need PSReadLine 2.2.6 or above.

    You will also need Microsoft.WinGet.Client version 1.8.1133 or higher to receive suggestions.

    If PSFeedbackProvider and PSCommandNotFoundSuggestion are not yet enabled, then you can run the following commands in PowerShell:

    Code:
    Enable-ExperimentalFeature PSFeedbackProvider
    Code:
    Enable-ExperimentalFeature PSCommandNotFoundSuggestion

    You will only need to run these commands once and they will enable PSFeedbackProvider and PSCommandNotFoundSuggestion in your next session.

    Installation

    To install the WinGet CommandNotFound module, enter the following in PowerShell 7.4+:

    Code:
    Install-PSResource -Name Microsoft.WinGet.CommandNotFound

    Setup

    To load this module whenever a PowerShell session loads, you will need to add the following to your PowerShell profile:

    Code:
    Import-Module Microsoft.WinGet.CommandNotFound

    You can enter code $profile or notepad $profile in PowerShell to open up your PowerShell profile in Visual Studio Code or Notepad respectively.

    Thank you!

    We would like to give a huge thanks to everyone that helped us incubate this feature in PowerToys and the PowerShell team for helping us push this to the PowerShell Gallery.

    This module is also open-source so if you find any bugs or have an idea for a feature suggestion, then please visit GitHub - microsoft/winget-command-not-found: WinGet Command Not Found is a PowerShell 7 module to help you install missing packages. With this module, you will be recommended relevant WinGet packages whenever an unrecognized command is entered.


     Source:

    https://devblogs.microsoft.com/comma...mmandnotfound/
    Brink's Avatar Posted By: Brink
    21 May 2024


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:21.
Find Us




Windows 10 Forums