Title: incorrect highlight of command with variable · Issue #836 · PowerShell/PSReadLine · GitHub
Open Graph Title: incorrect highlight of command with variable · Issue #836 · PowerShell/PSReadLine
X Title: incorrect highlight of command with variable · Issue #836 · PowerShell/PSReadLine
Description: The syntax highlighting often gives the user the idea of what is going to happen, but in a few situations it seems to indicate the wrong things. $a='goodbye' hello$a # 'hello' is yellow, '$a' is green like its going to be expanded, but i...
Open Graph Description: The syntax highlighting often gives the user the idea of what is going to happen, but in a few situations it seems to indicate the wrong things. $a='goodbye' hello$a # 'hello' is yellow, '$a' is gr...
X Description: The syntax highlighting often gives the user the idea of what is going to happen, but in a few situations it seems to indicate the wrong things. $a='goodbye' hello$a # 'hello' is ye...
Opengraph URL: https://github.com/PowerShell/PSReadLine/issues/836
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"incorrect highlight of command with variable","articleBody":"The syntax highlighting often gives the user the idea of what is going to happen, but in a few situations it seems to indicate the wrong things.\r\n\r\n```PowerShell\r\n$a='goodbye'\r\nhello$a # 'hello' is yellow, '$a' is green like its going to be expanded, but it doesn't\r\n# instead, \"The term 'hello$a' is not recognized as the name of a …\" is returned.\r\n```\r\n\r\nI think it is safe to say, everything highlighted yellow, does not allow expansion\r\n\r\n```PowerShell\r\nfunction hello () {echo $args}\r\n$a= @{hello=3;goodbye=4}\r\n$a[hello] # 'hello]' is yellow, like it could be a function call, but function calls seem not to be permitted in array index\r\n$a[hello goodbye] # as you type, it looks like its going to be valid, but the prompt knows, its still red at the end.\r\n$a[(hello goodbye)] # this is accepted\r\n```\r\n\r\n\r\nThis seems to really confuse the syntax highlighting:\r\n```PowerShell\r\n$a[(hello$b goodbye)]\r\n```\r\n\r\n\r\n\r\nEnvironment data\r\n----------------\r\n```\r\nPS version: 6.1.1\r\nPSReadline version: 2.0.0-beta3\r\nos: 10.0.18298.1000 (WinBuild.160101.0800)\r\nPS file version: 6.1.1\r\n```\r\n","author":{"url":"https://github.com/msftrncs","@type":"Person","name":"msftrncs"},"datePublished":"2018-12-18T04:23:10Z","url":"https://github.com/PowerShell/PSReadLine/issues/836"}
| 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:785e7fa8-cb34-a69a-d92e-0f1ee29883c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D25E:3F81BD:B78302:F8E352:6AFE6E12 |
| html-safe-nonce | 3504cb010cfd7ba4db45a8cf783f1d2077e3812d283ae1641a2cba166a917c07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjVFOjNGODFCRDpCNzgzMDI6RjhFMzUyOjZBRkU2RTEyIiwidmlzaXRvcl9pZCI6IjI3OTIzMTA0NTg4NjA1OTY3NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4a5ab43cd58ae6a0d7c98ff709317ba680846d749a0959c1756b1f867f1fb3aa |
| hovercard-subject-tag | issue:391991109 |
| 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/PSReadLine/836/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b3b5fcfa748b912087d42f68b4ab39e155e1a6ad1050c9d6d01af70ad071551/PowerShell/PSReadLine/issues/836 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b3b5fcfa748b912087d42f68b4ab39e155e1a6ad1050c9d6d01af70ad071551/PowerShell/PSReadLine/issues/836 |
| og:image:alt | The syntax highlighting often gives the user the idea of what is going to happen, but in a few situations it seems to indicate the wrong things. $a='goodbye' hello$a # 'hello' is yellow, '$a' is gr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msftrncs |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSReadLine git https://github.com/PowerShell/PSReadLine.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 10025737 |
| octolytics-dimension-repository_nwo | PowerShell/PSReadLine |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 10025737 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSReadLine |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width