Psreadline: PSReadline should provide suggestions when command is not found

Created on 22 Apr 2015  路  7Comments  路  Source: PowerShell/PSReadLine

Example:

Get-Prcss

Should return:

Get-Process (and other similar cmdlets)

Issue-Enhancement

All 7 comments

Ths wld tottally halp me alot at wrk.

This would be handy, might simplify writing a port of this

Cheers!

I've sort of implemented that in https://github.com/dfinke/PowerShellFuzzySearch. I've looked into integrating with PSReadLine, but couldn't figure it out in the fleeting spare moment I had to look at it.

posh> Select-FuzzyCommand Get-Prcss

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Get-AppvVirtualProcess                             1.0.0.0    AppvClient
Function        Get-NetAdapterEncapsulatedPacketTaskOffload        2.0.0.0    NetAdapter
Function        Get-SupportedClusterSizes                          2.0.0.0    Storage
Cmdlet          Get-ComputeProcess                                 1.0.0.0    HostComputeService
Cmdlet          Get-Process                                        3.1.0.0    Microsoft.PowerShell.Management
Cmdlet          Get-PSHostProcessInfo                              3.0.0.0    Microsoft.PowerShell.Core
Cmdlet          Get-VMProcessor                                    2.0.0.0    Hyper-V

@cdhunt , this would be awesome. I'd love to see a fork of PSReadLIne with such integrated.

@1RedOne I got a basic Handler working. It uses Out-GridView so the experience is meh, but it's a start.
https://github.com/cdhunt/PowerShellFuzzySearch

@lzybkr Do you have an example of how to implement some in-console-based selection list like the built-in tab-completion?

MenuComplete is where the cool tab completion selection is implemented, but it doesn't work correctly on Linux - I need to redo the rendering.

When I get to that, I'll keep in mind making it more generic and adding an API for you.

This is related to the work of re-designing suggestion framework in PowerShell.

Was this page helpful?
0 / 5 - 0 ratings