ClassExplorer icon indicating copy to clipboard operation
ClassExplorer copied to clipboard

Improve tab-completion for generic types

Open mklement0 opened this issue 2 years ago • 2 comments

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.

mklement0 avatar Oct 21 '23 16:10 mklement0

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

SeeminglyScience avatar Jan 17 '24 20:01 SeeminglyScience

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

SeeminglyScience avatar Jan 17 '24 20:01 SeeminglyScience