Title: Wildcard matching should be used in help file search · Issue #3967 · PowerShell/PowerShell · GitHub
Open Graph Title: Wildcard matching should be used in help file search · Issue #3967 · PowerShell/PowerShell
X Title: Wildcard matching should be used in help file search · Issue #3967 · PowerShell/PowerShell
Description: In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once. I would have expected a fix more like: var wildcardPattern = Wildca...
Open Graph Description: In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once. I would have expected a fix...
X Description: In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once. I would have expected a...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3967
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wildcard matching should be used in help file search","articleBody":"In https://github.com/PowerShell/PowerShell/pull/3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once.\r\n\r\nI would have expected a fix more like:\r\n\r\n```C#\r\n var wildcardPattern = WildcardPattern.ContainsWildcardCharacters(pattern)\r\n ? WildcardPatter.Get(pattern, WildcardOptions.IgnoreCase)\r\n : null;\r\n\r\n foreach (string filePath in files)\r\n {\r\n if (filePath.IndexOf(pattern, StringComparison.OrdinalIgnoreCase) \u003e= 0)\r\n {\r\n result.Add(filePath);\r\n break;\r\n }\r\n\r\n if (wildcardPattern.?IsMatch(pattern))\r\n { \r\n result.Add(filePath);\r\n }\r\n }\r\n```","author":{"url":"https://github.com/lzybkr","@type":"Person","name":"lzybkr"},"datePublished":"2017-06-07T23:21:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3967/PowerShell/issues/3967"}
| 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:5cbf50e6-a29f-fdcf-61ba-8fada27c7d51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D132:7F3E2:606AD2:89F3B4:6A548E5F |
| html-safe-nonce | acd6407e95cd2e7a7aea8a2ef9a65d22665878d166eef132bc0ee9185a2185ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTMyOjdGM0UyOjYwNkFEMjo4OUYzQjQ6NkE1NDhFNUYiLCJ2aXNpdG9yX2lkIjoiMTA4MzI1Nzg1NDEwOTE5MTc3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f0c06359be35d093193a8f0090ab1941806a635d951129b5873d2e3279e5a489 |
| hovercard-subject-tag | issue:234369972 |
| 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/3967/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2c71d20235811eda9963cc685d3d6ea3fc8a41309c18b4b17d468da248805b28/PowerShell/PowerShell/issues/3967 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2c71d20235811eda9963cc685d3d6ea3fc8a41309c18b4b17d468da248805b28/PowerShell/PowerShell/issues/3967 |
| og:image:alt | In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once. I would have expected a fix... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lzybkr |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width