-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove unused string completion code #19879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused string completion code #19879
Conversation
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
I'd prefer this work and in |
|
@iSazonov (and @fflaten since I see you gave a 👍) do you care about the type literal member completion? Or is it just the variable member completion you would like to see? There wouldn't be any completion for the type literal itself so you would have to enter the whole typename yourself before the member completion would be able to change it to a subexpression. As for the here-string completion, that's definitely out of scope for now as I'm waiting on my proposed here-string syntax changes to either get merged or rejected. |
|
Variable member completion for me. Sounds like a nice way to introduce the subexpression-requirement for new users considering variable completion itself works (unlike type completion). |
|
I mainly mean that if PowerShell allows code between double quotes, then it would be logical to expect IntelliSense to work exactly the same as in normal mode. |
|
@iSazonov Well, that's just the thing. PowerShell doesn't allow that syntax inside strings, you need a subexpression, and inside subexpressions the tab completion works as you would expect. This is just "magic" code that infers that the user probably wants to access a member so it adds the subexpression for the user. |
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes indicate that the isQuotedString parameter is never passed in a true value, making all related code not used.
Given that this targets an uncommon scenario, I'm fine with removing the dead code to reduce complexity.
Yeah I'm inclined to agree. Especially since removing the method isn't causing any build errors so we're not missing another invocation (and the compiler wouldn't be calling this with reflection so we're safe there). LGTM |
PR Summary
Removes unused code for completing members in double quoted strings.
The idea seems to have been that users would have been able to enter a variable, or literal type in a double quoted string and tab complete the member to auto convert it into a subexpression like this:
But the actual code isn't working.
An obvious alternative to removing the code would be to fix it but I've never seen anyone request this and it doesn't seem very useful to me.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).