Skip to content

Enable tab completion for variables that are of a flag (bit-field) enum type #10647

Closed

Description

Summary of the new feature/enhancement

Per request from Steve Lee (@SteveL-MSFT):

#10631 asks for tab completion for values assigned to variables whose type is a simple System.Enum-derived type.

This support should be extended to also work for flag (bit-field) enumerations, so that something like the following would work:

# Sample flags enumeration.
[Flags()] enum Foo { first = 0x1; second = 0x2; third = 0x4 }

# Tab-complete flag values inside strings too (with or without a closing quote present).
[Foo] $v = 'first, th'<tab>  # -> 'first, third', tantamount to [Foo]::first -bor [Foo]::third

Activity

  1. added
    Issue-Enhancement
    on Sep 29, 2019
  2. added
    Hacktoberfest
    Up-for-Grabs
    on Sep 29, 2019
  3. mklement0 commented on Mar 18, 2021

    @mklement0
    ContributorAuthor

    Note that casting arrays of names works too, the following should work as well:

    # Tab-complete individual array elements
    [Foo] $v = 'first', 'th<tab> 
  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. 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.

  7. added
    Resolution-No Activity
    on Nov 16, 2023
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

    HacktoberfestIssue-EnhancementResolution-No ActivityUp-for-GrabsWG-Interactive-IntelliSense

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions