Add -PropertyType argument completer for New-ItemProperty#21117
Add -PropertyType argument completer for New-ItemProperty#21117iSazonov merged 20 commits intoPowerShell:masterfrom
-PropertyType argument completer for New-ItemProperty#21117Conversation
-PropertyType argument completer for New-ItemProperty-PropertyType argument completer for New-ItemProperty
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
-PropertyType argument completer for New-ItemProperty-PropertyType argument completer for New-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 for New-ItemProperty-PropertyType argument completer for New-ItemProperty
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
MartinGC94
left a comment
There was a problem hiding this comment.
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.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
|
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 to
d0373c0
Compare
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
Outdated
Show resolved
Hide resolved
-PropertyType argument completer for New-ItemProperty-PropertyType argument completer for New-ItemProperty
2af476e to
a8d8dc3
Compare
|
📣 Hey @ArmaanMcleod, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
PR Summary
Fixes #21116
This PR adds an argument completer for Option 1 described in linked issue.
Add
-PropertyTypeargument completer forNew-ItemPropertycommand.PR Context
Currently you cannot tab complete registry value kinds for
New-ItemProperty -PropertyType. This PR adds aPropertyTypeArgumentCompleterwhich matcheswordToCompleteagainst the possible enum values ofRegistryValueKind.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).