Summary of the new feature / enhancement
Currently New-ItemProperty -PropertyType does not have tab completion for the following registry value kinds below:
Unknown
String
ExpandString
Binary
DWord
MultiString
QWord
None
Which are documented here.
Additionally, something worth noting is the type documented for this parameter is RegistryValueKind but the type is actually string, which seems like an issue in itself to fix the documentation. Can probably raise another issue for this.
Proposed technical implementation details (optional)
Option 1
- Create argument completer which goes through values of
RegistryValueKind and matches wordToComplete with possible enum values.
- Make sure path is using
Registry provider and ignore any other provider.
- Add
ArgumentCompleter attribute to PropertyType parameter.
Option 2 (Preferrable)
- Change type of
PropertyType to RegistryValueKind. This will enable tab completion automatically since this type is an enum.
- Benefit here is that it aligns directly with documentation and is simpler. I don't believe this is a breaking change, since user can use enum parameter with strings the same way as before.