GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Autocompletion gives no results for $PSItem / $_ in Catch blocks · Issue #7828 · PowerShell/PowerShell

Autocompletion gives no results for $PSItem / $_ in Catch blocks #7828

New issue
Copy link
New issue
Copy link
Closed
#8020
Closed
Autocompletion gives no results for $PSItem / $_ in Catch blocks#7828
#8020
Copy link
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

@vexx32
Rain Sallow (/u/ta11ow) (vexx32)
opened on Sep 20, 2018
Issue body actions

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.0
Reacted by Felix Becker and Rob Holt

Activity

  1. iSazonov commented on Sep 20, 2018

    @iSazonov
    Ilya (iSazonov)
    on Sep 20, 2018
    Collaborator
    More actions

    Related #3373

  2. Ilya (iSazonov)
    added
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    WG-Interactive-IntelliSensetab completiontab completion
    on Sep 20, 2018
  3. BrucePay commented on Sep 21, 2018

    @BrucePay
    Bruce Payette (BrucePay)
    on Sep 21, 2018
    Collaborator
    More actions

    Ilya (@iSazonov) I'm not sure why this is marked as a question. It sounds like an enhancement request to me.

  4. iSazonov commented on Sep 21, 2018

    @iSazonov
    Ilya (iSazonov)
    on Sep 21, 2018
    Collaborator
    More actions

    Bruce Payette (@BrucePay) I do not know if it is possible to implement. If yes, then this is an enhancement.

  5. Steve Lee (SteveL-MSFT)
    added
    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug
    on Oct 2, 2018
  6. Ilya (iSazonov)
    closed this as completedin #8020on Oct 18, 2018
  7. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    and removed
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    on Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.