lsd-rs / lsd

The next gen ls command
Apache License 2.0
12.8k stars 413 forks source link

Disable classify when piped #1028

Closed bryanjhv closed 2 months ago

bryanjhv commented 2 months ago

The --classify flag (indicators option) is turned on when piped to other commands. This PR fixes that, disabling display_indicators when output is not a TTY. Fixes #918.


TODO

muniu-bot[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bryanjhv Once this PR has been reviewed and has the lgtm label, please assign zwpaper for approval by writing /assign @zwpaper in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/lsd-rs/lsd/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
zwpaper commented 2 months ago

hi @bryanjhv, thanks for the contribution, but the classify is enabled only when you turn it on, this is also how the GNU ls works

the issue is more about adding a flag --indicator-style=none.

so I am closing this PR for now, and feel free to open one for the --indicator-style=none flag

bryanjhv commented 2 months ago

Oh, now I see. Seems the most viable option to remain compatible with GNU ls.