CommandCompletion's Tooltip is useless - by S.K. _

Status : 

 


1
1
Sign in
to vote
ID 786798 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 5/12/2013 8:02:16 AM
Access Restriction Public

Description

CommandCompletion's Tooltip is useless


The following output are currently CommandCompletion's Tooltips.

PS > $a = [Management.Automation.CommandCompletion]::CompleteInput('ls -', 4, $null )
PS > $a.CompletionMatches | ft CompletionText, Tooltip

-Path	[string[]] Path	
-LiteralPath	[string[]] LiteralPath	
-Filter	[string] Filter	
-Include	[string[]] Include	
-Exclude	[string[]] Exclude


Oh yeah! I could see '-Path' is '[string[]] Path', this is very usefull, isn't it?
If you agree, please vote down.
I cannnot agree at all.

What I want to see in tooltip, is its description.
In short, it should show Get-Help's output.
for example,


PS > $a.CompletionMatches | ft CompletionText, Tooltip

-Path	Specifies a path to one or more locations.
-LiteralPath	Specifies a path to one or more locations. Unlike the Path parameter, the value of the LiteralPath parameter is used exactly as it is typed.
-Filter	Specifies a filter in the provider's format or language.
-Include	Gets only the specified items.	
-Exclude	Omits the specified items.

This is tooltip, isn't it? What I want is surely this.



Next, tooltip for cmdlets.

PS > $a = [Management.Automation.CommandCompletion]::CompleteInput('Get-', 4, $null )
PS > $a.CompletionMatches | ft CompletionText, Tooltip

Get-Acl	

Get-Acl [[-Path] <string[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]
Get-Acl -InputObject <psobject> [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]
Get-Acl [-LiteralPath <string[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]
	
Get-Alias	
Get-Alias [[-Name] <string[]>] [-Exclude <string[]>] [-Scope <string>] [<CommonParameters>]
Get-Alias [-Exclude <string[]>] [-Scope <string>] [-Definition <string[]>] [<CommonParameters>]

Get-AppLockerFileInformation	Get-AppLockerFileInformation
	

Ok, he output cmdlt's syntaxes. This tooltip is better than parameter's one, but unclear after all.
He should output cmdlet synopsis at first.



PS > $a.CompletionMatches | ft CompletionText, Tooltip

Get-Acl	

Gets the security descriptor for a resource, such as a file or registry key.

Get-Acl [[-Path] <string[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]
Get-Acl -InputObject <psobject> [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]
Get-Acl [-LiteralPath <string[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-UseTransaction] [<CommonParameters>]


Get-Alias

Gets the aliases for the current session.

Get-Alias [[-Name] <string[]>] [-Exclude <string[]>] [-Scope <string>] [<CommonParameters>]
Get-Alias [-Exclude <string[]>] [-Scope <string>] [-Definition <string[]>] [<CommonParameters>]


Sign in to post a comment.