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-10088) Add example for normalizing Read-Host input #10089

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented May 22, 2023

PR Summary

Prior to this change, the documentation for the Read-Host cmdlet didn't include information about trimming the input. The cmdlet doesn't have a built-in way to trim extra spaces from the input value, which is an arbitrary string.

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.

@learn-build-service-prod

This comment was marked as outdated.

Copy link
Contributor

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See suggested wording. Otherwise, looks good. Copy to all versions.

reference/7.3/Microsoft.PowerShell.Utility/Read-Host.md Outdated Show resolved Hide resolved
Prior to this change, the documentation for the `Read-Host` cmdlet didn't include
information about trimming the input. The cmdlet doesn't have a built-in way to
trim extra spaces from the input value, which is an arbitrary string.

This change:

- Adds an example to `Read-Host` showing how user input may need to normalized
  before it can be used. It also shows how a reader can apply some simple
  normalizing techniques to clean up the input.
- Resolves MicrosoftDocs#10088
- Fixes AB#91532
@michaeltlombardi michaeltlombardi force-pushed the ab-91532/main/read-host-normalizing branch from f8fb80a to 15fb612 Compare May 22, 2023 18:36
@michaeltlombardi michaeltlombardi marked this pull request as ready for review May 22, 2023 18:36
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 15fb612:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Utility/Read-Host.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Utility/Read-Host.md ✅Succeeded View (powershell-7.2)
reference/7.3/Microsoft.PowerShell.Utility/Read-Host.md ✅Succeeded View (powershell-7.3)
reference/7.4/Microsoft.PowerShell.Utility/Read-Host.md ✅Succeeded View (powershell-7.4)

For more details, please refer to the build report.

For any questions, please:

@sdwheeler sdwheeler merged commit 1cb441b into MicrosoftDocs:main May 22, 2023
4 checks passed
@mklement0
Copy link
Contributor

🙏

@michaeltlombardi michaeltlombardi deleted the ab-91532/main/read-host-normalizing branch May 23, 2023 14:29
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.

Read-Host: Show how to trim leading and trailing whitespace from user input
3 participants