- Notifications
You must be signed in to change notification settings - Fork7.7k
Add commands for controlling completion options#19518
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedApr 23, 2023
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days. |
ghost commentedMay 23, 2023
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for15 days. It will be closed if no further activity occurswithin 10 days of this comment. |
I am NOT an expert in the code - but I did look! For my benefit where are these completion options to be stored? Are they persisted? Also - what is the status on this? |
MartinGC94 commentedMay 24, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In the execution context (same place that argument completers are stored) so no, it's not persistent.
I was waiting on the path completion improvements PR to get merged (which happened earlier this week) as well as the ExcludeModule parameter PR:#18955 |
This PR has Quantification details
Why proper sizing of changes mattersOptimal 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) |
ghost commentedJun 12, 2023
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for15 days. It will be closed if no further activity occurswithin 10 days of this comment. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days. |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Adds the commands:
which allows the user to view and change various code completion related settings.
Currently there are 4 options available:
1: AddTrailingSeparatorForContainers (bool) which determines whether or not a separator should be added at the end of directory completions, like:
gci C:\Windo<Tab> -> C:\Windows\
2: PreferredPathSeparator (Enum) which determines how to handle separators when completing file paths. There are 4 possible values:
3: PathSorting (Enum) which determines how path completion results are sorted. Default behavior is to sort by the full path but this can be turned off, or changed to list containers first.
4: ExcludedModules (string array) which allows users to exclude commands from certain modules from the completion results.
PR Context
Fixes#18963
As mentioned in that issue there are various user requests to change code completion behavior and some of those requests may not be suited for everyone.
We already have the "Options" hashtable in
Tabexpansion2
but it's not very user friendly to edit that function to change completion options you may want to change on the fly.A point worth discussing would be if we should include the existing completion options (Include hidden fileshares, relative/full paths and literal VS normal paths).
I decided to take inspiration from
Register-ArgumentCompleter
and make these options into commands, rather than a PS variable but either option is fine by me.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).