Title: ValidateRange should not allow iteration over invalid range values · Issue #2849 · PowerShell/PowerShell · GitHub
Open Graph Title: ValidateRange should not allow iteration over invalid range values · Issue #2849 · PowerShell/PowerShell
X Title: ValidateRange should not allow iteration over invalid range values · Issue #2849 · PowerShell/PowerShell
Description: Steps to reproduce In any module that uses an Enum value to be passed. For example: -Type { Start, Stop, Pause} if you use the ValidateRange(Start, Stop) attribute tab completion will still cycle through -Type Pause too even though execu...
Open Graph Description: Steps to reproduce In any module that uses an Enum value to be passed. For example: -Type { Start, Stop, Pause} if you use the ValidateRange(Start, Stop) attribute tab completion will still cycle t...
X Description: Steps to reproduce In any module that uses an Enum value to be passed. For example: -Type { Start, Stop, Pause} if you use the ValidateRange(Start, Stop) attribute tab completion will still cycle t...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2849
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ValidateRange should not allow iteration over invalid range values","articleBody":"\u003c!--\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](../docs/FAQ.md).\r\n- Refer to the [known issues](../docs/KNOWNISSUES.md).\r\n- Fill out the following repro template\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n--\u003e\r\n\r\nSteps to reproduce\r\n------------------\r\nIn any module that uses an Enum value to be passed. For example: -Type { Start, Stop, Pause} if you use the ValidateRange(Start, Stop) attribute tab completion will still cycle through -Type Pause too even though executing this would fail. It would be really cool if the tab completion didnt iterate over invalid ranges.\r\n\r\nExpected behavior\r\n-----------------\r\nTab completion would only iterate over { Start, Stop }\r\n\r\nActual behavior\r\n---------------\r\nIt iterates over all enum values.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\n\r\n```\r\n","author":{"url":"https://github.com/jterry75","@type":"Person","name":"jterry75"},"datePublished":"2016-12-07T00:00:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2849/PowerShell/issues/2849"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7333c751-cc95-edb0-96fc-bd47f427a1e1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E34:102E20:718A3:9AF7D:6A550F86 |
| html-safe-nonce | 97ecf9a353c59b10ea88b271734bfd2b132d5c48782e95d9b07637c97870c3cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTM0OjEwMkUyMDo3MThBMzo5QUY3RDo2QTU1MEY4NiIsInZpc2l0b3JfaWQiOiI5MTAzNTY0NDQ1NjA3ODU4MDU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b571e61b45ec813f8d9220a60f5578869043bafaa416fc678aece940bbbe5655 |
| hovercard-subject-tag | issue:193921127 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/2849/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e285f04f313a98cab375426aafc66836bef2b99d6afb17c0a92e52e6f3c66154/PowerShell/PowerShell/issues/2849 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e285f04f313a98cab375426aafc66836bef2b99d6afb17c0a92e52e6f3c66154/PowerShell/PowerShell/issues/2849 |
| og:image:alt | Steps to reproduce In any module that uses an Enum value to be passed. For example: -Type { Start, Stop, Pause} if you use the ValidateRange(Start, Stop) attribute tab completion will still cycle t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jterry75 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f2adbaa4b43ea302b02981f637a782ae92ed6dc |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width