Enhance PowerShell switch parameter guidance and examples#1091
Closed
time-by-waves wants to merge 9 commits into
Closed
Enhance PowerShell switch parameter guidance and examples#1091time-by-waves wants to merge 9 commits into
time-by-waves wants to merge 9 commits into
Conversation
…an parameters (#2) * Initial plan * Enhanced PowerShell switch parameter guidance with anti-patterns Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address review feedback: simplify guidance, merge examples, add ShouldContinue Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Clarify switch default value syntax in example comment Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Simplify Error Handling example and clarify switch syntax comment Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Replace Show-Process with Show-FileInfo to avoid cmdlet name confusion Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Remove usage comments from Error Handling example Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Remove inappropriate ConfirmImpact from read-only operation Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Change example to destructive operation with appropriate ConfirmImpact Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…an parameters (#2) * Initial plan * Enhanced PowerShell switch parameter guidance with anti-patterns Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address review feedback: simplify guidance, merge examples, add ShouldContinue Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Clarify switch default value syntax in example comment Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Simplify Error Handling example and clarify switch syntax comment Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Replace Show-Process with Show-FileInfo to avoid cmdlet name confusion Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Remove usage comments from Error Handling example Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Remove inappropriate ConfirmImpact from read-only operation Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> * Change example to destructive operation with appropriate ConfirmImpact Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: time-by-waves <34587654+time-by-waves@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts: # plugins/dataverse/.github/plugin/plugin.json
Sync fork main with upstream/main
…an parameters Completes Issue: Enhance PowerShell instructions for switch parameter usage over boolean parameters #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.Description
Error Handling
powershell.instructions.mdfile. Now includes less error handling in the examples. This means when using the instructions file the output script contains less of the structured error handling, however the output scripts are easier for beginners and powershell novices to read and understand.Switch parameter
Examples updates
WhatIfparameter via$PSCmdlet.ShouldProcesss$Force&$PSCmdlet.ShouldContinuepatternType of Contribution
Additional Notes
I've tested the new instructions for a few months on and off. Many different models have been used, and I'm happier with the generated results of these instructions.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.