-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-IntelliSensetab completiontab completion
Description
Despite the fact that catch blocks should always receive an ErrorRecord object as the $_ or $PSItem value, there is no autocompletion / type inference performed for its properties, nor those of the Exception and/or InnerExceptions it contains.
Steps to reproduce
try {
throw "nope"
}
catch {
$PSItem.{tab}
}Expected behavior
$PSItem.CategoryInfo # And cycle through list of ErrorRecord properties on subsequent presses
(I know there's a programmatic way to get completion results, but I'm not familiar enough with how it works to be able to put that together at present.)
Actual behavior
$PSItem. # no completion results offered whatsoever
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0felixfbecker and rjmholt
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-IntelliSensetab completiontab completion