lsd-rs / lsd-rs/lsd

lsd -l --header doesn't filter ANSI sequences

Open
#775 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

I would mark this as a bug. But my issue template was not accepted. Couldn't figure out why, didn't think it matters much either.
This is a problem in the latest version, possibly all versions with --header.

## Current Behaviour

`lsd -l --header` doesn't filter ANSI sequences when not on a tty/pty
`lsd -l --header | less` for example

## Expected Behaviour:

It should filter ANSI sequences.

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 issue with `lsd -l --header | less`, comparing terminal and non-TTY output. Find the `--header` handling and ANSI filtering path, then verify that piped output contains no ANSI sequences while terminal behavior remains correct.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.