Skip to content

Improve tab-completion for generic types #52

Open

Description

@mklement0

First things first: Great module, thanks for sharing.

When you tab-complete a generic type, the ` characters don't get escaped, which means that the completed results cannot be used as-is; e.g.:

# Select 'List[1]' for completion
Find-Type List<tab>

This yields Find-Type List`1, which does not work, because the ` needs escaping (Find-Type List``1)

Similarly, neither Find-Type List`<tab> nor Find-Type List[<tab> result in a completion.

Activity

  1. SeeminglyScience commented on Jan 17, 2024

    @SeeminglyScience
    Owner

    Thank you! (sorry for the late reply, notifications are a mess)

    Yep definitely agree. At some point I thought I had it set up to complete to List[any] (which does work as the name is parsed like a type signature but I guess I never actually added that. Will do though

  2. SeeminglyScience commented on Jan 17, 2024

    @SeeminglyScience
    Owner

    Ah, it works for parameters that accept a signature like Find-Member's ParameterType, but I should also rig it to work with Name I think. Little bit tricker since it's not actually resolvable without the namespace

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions