Skip to content
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

Migrate Unique ArgCompleters on the parameters themselves #6

Open
TechDufus opened this issue Apr 7, 2021 · 0 comments
Open

Migrate Unique ArgCompleters on the parameters themselves #6

TechDufus opened this issue Apr 7, 2021 · 0 comments

Comments

@TechDufus
Copy link
Owner

I just learned you can add [ArgumentCompleter()] with the arg complete scriptblock which provides the same functionality that Register-ArgumentCompleter does.

Need to think about pulling these scriptblocks into the functions themselves? This removes the centrally stored scriptblock that applies to multiple parameters. A downside would be having to edit all parameter definitions if a change to the arg completer is necessary.

On the other hand, if an arg completer is unique (in that it applies to one parameter on one function), then it could easily be moved onto the parameter. BUT if the module structure still supports an area for arg-complater definitions that aren't unique, it may be confusing to have some argcompleters on parameters and others in the module arg-completer folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant