- Notifications
You must be signed in to change notification settings - Fork7.7k
Add-PropertyType
argument completer forNew-ItemProperty
#21117
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
Add-PropertyType
argument completer forNew-ItemProperty
#21117
Uh oh!
There was an error while loading.Please reload this page.
Conversation
-PropertyType
argument completer forNew-ItemProperty
-PropertyType
argument completer forNew-ItemProperty
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
-PropertyType
argument completer forNew-ItemProperty
-PropertyType
argument completer forNew-ItemProperty
Thanks@iSazonov, I've changed implementation to check if registry provider is used. Also@MartinGC94 let me know what you think, took some inspiration from your argument completer 🙂. |
-PropertyType
argument completer forNew-ItemProperty
-PropertyType
argument completer forNew-ItemProperty
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
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.
Overall logic seems fine, but I agree with@iSazonov suggestion about not converting all of the paths to an array. If you change that + my minor suggestions then I would be fine with this.
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Thanks@iSazonov and@MartinGC94 for the comprehensive and helpful feedback. I have made changes to address the comments, please have a look and let me know if I've missed anything. For the multiple paths, I am now just running |
7763f77
tod0373c0
Comparesrc/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
-PropertyType
argument completer forNew-ItemProperty
-PropertyType
argument completer forNew-ItemProperty
2af476e
toa8d8dc3
Comparee127345
intoPowerShell:masterUh oh!
There was an error while loading.Please reload this page.
microsoft-github-policy-servicebot commentedDec 25, 2024 • edited by unfurl-linksbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by unfurl-linksbot
Uh oh!
There was an error while loading.Please reload this page.
📣 Hey@ArmaanMcleod, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗https://aka.ms/PSRepoFeedback |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Fixes#21116
This PR adds an argument completer for Option 1 described in linked issue.
Add
-PropertyType
argument completer forNew-ItemProperty
command.PR Context
Currently you cannot tab complete registry value kinds for
New-ItemProperty -PropertyType
. This PR adds aPropertyTypeArgumentCompleter
which matcheswordToComplete
against the possible enum values ofRegistryValueKind
.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).