PrismJS / PrismJS/prism

bash language does not recognize parameter tokens written in dash-case

Open Beginner friendly
#3,569 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

language-definitions
Dominant language
JavaScript
Stars
13k
Forks
1.4k
Avg merge
15h 36m
Merged PRs (30d)
3

Description

Information

  • Language: bash, shell
  • Plugins: none

Description
Multiple word command parameters in hyphen-case are not recognized to be class="token parameter variable" but are treated as plain text.

Code snippet

Test page

The code being highlighted incorrectly.
command --two-words --parameter

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Bash language grammar and reproduce the issue using the linked Prism test page and the snippet command --two-words --parameter. Compare the highlighting of hyphenated parameters with the expected token parameter variable classification; done means dash-case command parameters are recognized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, javascript, shell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.