You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: