Skip to content

prefix color manually #583

@y-nk

Description

@y-nk

Hello and thank you for your time.

Description:
a set of opening and closing {color} + {/color} markers for the --prefix option

Use Case:
I'm building a cli where i'd like only the name of the process to be colored, not the full prefix.

Assumption:
It should be quite easy to integrate. Refactoring would involve to:

  1. prefixing "prefix" string with {color} if opening marker not found
  2. suffixing "prefix" string with {/color} if closing marker not found
  3. have coloring applied starting on {color} until {/color}

these 3 things would make this new feature backward compatible (combination of 1 & 2 would color the whole string) and allow branching out for more customisation!

Contribution
If you're agreeing with this plan I can draft a PR for it.

Screenshots

Wanted:

Image

Currently:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions