Skip to content

Parameter completion should work even when #requires fails #4549

Closed

Description

@lzybkr

Steps to reproduce

In a non-elevated PowerShell, try to tab complete parameters to a script that looks like:

#requires -RunAsAdministrator
param($ABC)

Expected behavior

Completion works. Note that the current behavior is slightly useful as an indicator that the script won't run even after finishing the command line, but it is poor behavior in an editor that probably isn't running elevated.

Actual behavior

Completion fails silently

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.5
OS                             Microsoft Windows 10.0.16262
Platform                       Win32NT

Activity

  1. added
    Usability
    on Aug 10, 2017
  2. rjmholt commented on Mar 23, 2018

    @rjmholt
    Collaborator

    I've opened an RFC on updating the behaviour of #requires. Please feel free to comment in the PR.

  3. ghost added
    In-PR
    on Jul 14, 2022
  4. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  5. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  6. added
    Resolution-No Activity
    on Nov 16, 2023
  7. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  8. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

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

    In-PRResolution-No ActivityUsabilityWG-Interactive-IntelliSense

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions