-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Stop replacing variables in path tab completion #21148
base: master
Are you sure you want to change the base?
Stop replacing variables in path tab completion #21148
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) |
The Interactive WG discussed this. We love the change (and I desperately want it) but we think we need to have a larger conversation about configuring completion preferences before we could take this change (and changes like stopping I can't give any sort of timeline on when those conversations will complete (nor when the result of them will be implemented). It's up to you if you'd like to keep this PR open until that time comes or open a new one at that time. |
PR Summary
Improves tab completion so variables don't get replaced when tab completing paths, for example:
ls $env:windir\System3<Tab>
will tab complete to:ls $env:windir\System32
instead ofls C:\Windows\System32
.The way it works is that the variables are resolved, and the resulting string is used to find valid path completions, then the variable text is inserted back into the discovered paths. Because of this implementation it's not perfect, you can trick it to insert the variable into the wrong place, for example:
turns into
${Var}:\Windows\System32\config\
instead of the expected:C:\Windows\System32\${Var}onfig\
in practice it shouldn't be an issue because people usually use variables to define the root of a path, or to define entire path segments with more unique names.
PR Context
Fixes #5350
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).