[PR #381] [MERGED] Better handling for color in terminal #449

Closed
opened 2026-06-08 11:28:21 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bootandy/dust/pull/381
Author: @Its-Just-Nans
Created: 3/23/2024
Status: Merged
Merged: 3/26/2024
Merged by: @bootandy

Base: masterHead: color-handling


📝 Commits (6)

📊 Changes

11 files changed (+73 additions, -22 deletions)

View changed files

📝 README.md (+2 -1)
📝 completions/_dust (+2 -0)
📝 completions/_dust.ps1 (+2 -0)
📝 completions/dust.bash (+1 -1)
📝 completions/dust.elv (+2 -0)
📝 completions/dust.fish (+1 -0)
📝 man-page/dust.1 (+4 -1)
📝 src/cli.rs (+7 -0)
📝 src/config.rs (+4 -0)
📝 src/main.rs (+32 -19)
📝 tests/test_flags.rs (+16 -0)

📄 Description

Hi

With this PR

dust | less

will work out of the box

It checks if the output is a terminal (if not, it could be a pipe, so we disable the colors)

This PR also implements the https://no-color.org/ proposal

If you still want the colors you can use

dust -C
# or
dust --force-colors

Thanks !


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bootandy/dust/pull/381 **Author:** [@Its-Just-Nans](https://github.com/Its-Just-Nans) **Created:** 3/23/2024 **Status:** ✅ Merged **Merged:** 3/26/2024 **Merged by:** [@bootandy](https://github.com/bootandy) **Base:** `master` ← **Head:** `color-handling` --- ### 📝 Commits (6) - [`6aef31d`](https://github.com/bootandy/dust/commit/6aef31db616990d9f6a1cf46bd43552d4dfdcc90) better handling for color in terminal - [`ede4680`](https://github.com/bootandy/dust/commit/ede468033479d594598f5da56d6b0dde4b34a9d7) cleanup - [`d4cbc85`](https://github.com/bootandy/dust/commit/d4cbc85e67a624f762de76f58974be28fd88da23) cleanup - [`07e28ca`](https://github.com/bootandy/dust/commit/07e28ca1e27e170c8259e4360cfc2d22b1995c3d) cargo fmt - [`c1b3b1c`](https://github.com/bootandy/dust/commit/c1b3b1c5cfb4f8b1e80e447fa2c052a15719cf0c) clippy + tests - [`07a43c6`](https://github.com/bootandy/dust/commit/07a43c6a159afa3802954e219007eba90239749b) clean ### 📊 Changes **11 files changed** (+73 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -1) 📝 `completions/_dust` (+2 -0) 📝 `completions/_dust.ps1` (+2 -0) 📝 `completions/dust.bash` (+1 -1) 📝 `completions/dust.elv` (+2 -0) 📝 `completions/dust.fish` (+1 -0) 📝 `man-page/dust.1` (+4 -1) 📝 `src/cli.rs` (+7 -0) 📝 `src/config.rs` (+4 -0) 📝 `src/main.rs` (+32 -19) 📝 `tests/test_flags.rs` (+16 -0) </details> ### 📄 Description Hi With this PR ``` dust | less ``` will work out of the box It checks if the output is a terminal (if not, it could be a pipe, so we disable the colors) This PR also implements the https://no-color.org/ proposal If you still want the colors you can use ```bash dust -C # or dust --force-colors ``` Thanks ! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-06-08 11:28:21 +03:00
zhus closed this issue 2026-06-08 11:28:22 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#449