tldr-pages / tldr-pages/tldr-python-client

Colors when piping output to less.

Open
#199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
749
Forks
117
PR merge metrics
No merged PRs in 30d

Description

First of all thank you for this cool project.

When I pipe output to less, I lose colors.
I do something like:

tldr ls | less -ru~ +g

and get one-color (my terminal's fg) output.

less -ru~ +g is capable to draw colored/bold/etc texts.

For example, ls (exa) have an option --color=always and when I pipe it's output to less, I get the same colored output.

Please add an ability to have colors in less.

I use tldr 3.1.0-2.

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 reported command with tldr ls | less -ru~ +g and compare it with exa's colored piped output. Trace the tldr client's output path and identify where color information is removed; done means piped output preserves colors and bold text when viewed with less.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.