Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(powershell) Three official-approved VALID_VERBS not been highlighted #2981

Closed
davidhcefx opened this issue Jan 29, 2021 · 2 comments · Fixed by #2982
Closed

(powershell) Three official-approved VALID_VERBS not been highlighted #2981

davidhcefx opened this issue Jan 29, 2021 · 2 comments · Fixed by #2982
Labels
bug good first issue Should be easier for first time contributors help welcome Could use help from community language

Comments

@davidhcefx
Copy link
Contributor

davidhcefx commented Jan 29, 2021

Describe the issue
In the list of the official-approved verbs, there are three of them not included in the VALID_VERBS:

// https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx
const VALID_VERBS =
'Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|' +
'Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|' +
'Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|' +
'Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|' +
'ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|' +
'Limit|Merge|Out|Publish|Restore|Save|Sync|Unpublish|Update|' +
'Approve|Assert|Complete|Confirm|Deny|Disable|Enable|Install|Invoke|Register|' +
'Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|' +
'Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|' +
'Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|' +
'Unprotect|Use|ForEach|Sort|Tee|Where';

Those are:

  • Mount
  • Build
  • Deploy

By the way, the provided link doesn't work anymore. Please change to a workable link, for instance: https://docs.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands

Which language seems to have the issue?

powershell

Are you using highlight or highlightAuto?

Sample Code to Reproduce

Mount-DiskImage -ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"

Expected behavior

  • Mount-DiskImage being recognized as a whole built-in:
Mount-DiskImage -ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"

Additional context

@davidhcefx davidhcefx added bug help welcome Could use help from community language labels Jan 29, 2021
@joshgoebel joshgoebel added the good first issue Should be easier for first time contributors label Jan 29, 2021
@joshgoebel
Copy link
Member

Thanks. Looks like a good first issue. Would you like to try making a PR?

@davidhcefx
Copy link
Contributor Author

Done.
BTW, when building the code with docker, I found a typo in the document:

If your preference is for another port, you can do that too:
docker run -d --name highlight-js --rm -p 80:8080 highlight-js

To my understanding, I think it should be 8080:80 instead? The first number is for the host, and I think most people would change that part to 8080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Should be easier for first time contributors help welcome Could use help from community language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants