DashDash token causing remaining parameter tokens to be flagged as CommandName
See original GitHub issueApparently there is some special meaning to the DashDash token when it is used in command mode, but I couldn’t seem to uncover it. While trying to understand the tokenizer and parser I ran in to these two issues:
- A DashDash token causes further Parameter tokens to be flagged as CommandName, which can be confusing with PSReadLine if PSReadLine if changed to prioritize the highlighting of CommandName over Parameter (https://github.com/PowerShell/PSReadLine/pull/989).
- A DashDash token can be accepted as a command, when used with the invoke operators, but it does not get flagged with CommandName, and so causes PSReadLine to highlight it as a operator. Even when it is accepted as a command, the behavior in point 1 still occurs.
Steps to reproduce
& -- -NowACommandNameFlaggedToken
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
https://proteome.gs.washington.edu/~kaipot/share/r...
src/crux And I want to run a test named <test_name> And I pass the arguments --overwrite T <args> <results> When I run spectral-counts...
Read more >Windows PowerShell Specification
Tokens. Syntax: token: keyword variable command command-parameter command-argument-token integer-literal real-literal string-literal type-literal
Read more >bash(1): GNU Bourne-Again SHell | Linux Man Page - Dash Dash
The remaining words are passed as arguments to the invoked command. ... Using ;;& in place of ;; causes the shell to test...
Read more >IBM Storage Scale RAID: Administration
declustered array automatically, which causes IBM Storage Scale RAID to ... the --mmcrfs option is used to pass all remaining command line parameters...
Read more >Alpine Technical Notes: Configuration and Preferences
When running Alpine on a UNIX system, the default built-in configuration can be changed by setting variables in the system configuration files, /usr/local/lib/ ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vexx32 Since @msftrncs seemed unclear, I just wanted to point out that there is, in fact, a very specific meaning to
--
(and--%
).I also see this happening for the
--%
verbatim argument syntax.where
--%
is actually a command name, but the rest of the command line is one single verbatim argument.