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

(GH-11248) Clarify behavior for Register-ArgumentCompleter parameters #11249

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Jul 10, 2024

PR Summary

Prior to this change, the Register-ArgumentCompleter reference didn't indicate that specifying the CommandName parameter without the ParameterName or Native parameters causes the command to behave as if the user specified the -Native switch.

This change:

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

Copy link
Contributor

Learn Build status updates of commit 2f9a014:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.2)
reference/7.4/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

For any questions, please:

@mklement0
Copy link
Contributor

🙏

…ter` parameters

Prior to this change, the `Register-ArgumentCompleter` reference didn't indicate that
specifying the **CommandName** parameter without the **ParameterName** or **Native**
parameters causes the command to behave as if the user specified the `-Native` switch.

This change:

- Clarifies that users should always specify the **ParameterName** parameter when
  registering an argument completer for a PowerShell command.
- Resolves MicrosoftDocs#11248
- Fixes AB#281953
@michaeltlombardi michaeltlombardi force-pushed the ab-281953/main/argument-completer-behavior branch from 2f9a014 to 9d10a7a Compare July 10, 2024 20:24
Copy link
Contributor

Learn Build status updates of commit 9d10a7a:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.2)
reference/7.4/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

For any questions, please:

This change adds further clarification to various sections of
the reference documentation for `Register-ArgumentCompleter`.

It also addresses some style and formatting issues.
@michaeltlombardi michaeltlombardi marked this pull request as ready for review July 10, 2024 20:33
Copy link
Contributor

Learn Build status updates of commit ce7ccab:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.2)
reference/7.4/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

For any questions, please:

@sdwheeler sdwheeler merged commit c8b5bef into MicrosoftDocs:main Jul 10, 2024
5 checks passed
@Taojunshen Taojunshen mentioned this pull request Jul 10, 2024
4 tasks
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

Successfully merging this pull request may close these issues.

Clarify that not providing a -ParameterName argument implies the -Native switch
3 participants