Title: Custom-class and enum type literals are not recognized by tab completion · Issue #7287 · PowerShell/PowerShell · GitHub
Open Graph Title: Custom-class and enum type literals are not recognized by tab completion · Issue #7287 · PowerShell/PowerShell
X Title: Custom-class and enum type literals are not recognized by tab completion · Issue #7287 · PowerShell/PowerShell
Description: Note: Updated based on feedback from Dongbo Wang (@daxian-dbw) below. Any custom class and enum instances added to a session are currently not recognized by tab completion, whereas analogous definitions created via Add-Type based on stri...
Open Graph Description: Note: Updated based on feedback from Dongbo Wang (@daxian-dbw) below. Any custom class and enum instances added to a session are currently not recognized by tab completion, whereas analogous defini...
X Description: Note: Updated based on feedback from Dongbo Wang (@daxian-dbw) below. Any custom class and enum instances added to a session are currently not recognized by tab completion, whereas analogous defini...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7287
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Custom-class and enum type literals are not recognized by tab completion","articleBody":"\u003csup>Note: Updated based on feedback from @daxian-dbw below.\u003c/sup>\r\n\r\n**Any custom `class` and `enum` instances added to a session are currently not recognized by tab completion**, whereas analogous definitions created via `Add-Type` based on strings containing C# source code are:\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n# Define a custom enum\r\nenum Fruit { Apple = 1; Orange = 2}\r\n# Define an equivalent enum via Add-Type and C# code\r\nAdd-Type -TypeDefinition 'public enum SharpFruit { Apple = 1, Orange = 2 }'\r\n\r\nPS> [fru\u003ctab-keypress>\r\nPS> [sharpfru\u003ctab-keypress>\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n`[fru\u003ctab-keypress>` should complete to `[Fruit]`\r\n`[sharpfru\u003ctab-keypress>` should complete to `[SharpFruit]`\r\n\r\nActual behavior\r\n---------------\r\n\r\n`[fru\u003ctab-keypress>` performs no completion.\r\n\r\nBy contrast, `[sharpfru\u003ctab-keypress>` completes as expected.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPowerShell Core v6.1.0-preview.3 on macOS 10.13.5\r\nPowerShell Core v6.1.0-preview.3 on Ubuntu 16.04.4 LTS\r\nPowerShell Core v6.1.0-preview.3 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)\r\nWindows PowerShell v5.1.17134.48 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2018-07-13T19:30:00Z","url":"https://github.com/PowerShell/PowerShell/issues/7287"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:a47cd3d0-dd27-2c4c-8445-5c868b6b8b19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9832:199A61:23120A:312555:6AFDB0EB |
| html-safe-nonce | cda1d5774a9b9305d705eee2720a742f58da0d847f9538ccaf0c781146c7bd46 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODMyOjE5OUE2MToyMzEyMEE6MzEyNTU1OjZBRkRCMEVCIiwidmlzaXRvcl9pZCI6IjU0NjM5NzMwNjQwODMzNTM4MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ab828e1ad4381ad50630e47f05ebf076d142681ec9275eb5c12ddce0aba64718 |
| hovercard-subject-tag | issue:341134457 |
| 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/7287/issue_layout |
| twitter:image | https://opengraph.githubassets.com/15a324eb9102209f56bd15d3a7a93d4e5a0acc2c8cb8efd517cf497092de28f7/PowerShell/PowerShell/issues/7287 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/15a324eb9102209f56bd15d3a7a93d4e5a0acc2c8cb8efd517cf497092de28f7/PowerShell/PowerShell/issues/7287 |
| og:image:alt | Note: Updated based on feedback from Dongbo Wang (@daxian-dbw) below. Any custom class and enum instances added to a session are currently not recognized by tab completion, whereas analogous defini... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3c532f4d069d6fbe9b1837450343d1b9e0619a7d5c4ba0b3b64fd8e0bae67c7e |
| 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 | 5396ad00d1c6d19097aee7fc4d00a2eb03432c8f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width