PrismJS / PrismJS/prism

`bash` does not highlight command-line options that contain `-`

Open
#3,696 1 comment 0 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
  • Plugins: none

Description
bash does not highlight command-line options that contain - as part of the option name.

e.g.

--file-filter mkv

Code snippet

command --file-filter mkv

https://prismjs.com/test.html#language=bash&text=command%20--filter%20mkv%20--file-filter%20mkv

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

Reproduce the example in the linked Prism test page using the bash language and compare highlighting for --filter and --file-filter. Trace the bash language definition to the option-matching rule, then verify that command-line options containing hyphens are highlighted consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.