mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #147] [MERGED] Beautify help messages #326
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/147
Author: @QuarticCat
Created: 6/5/2021
Status: ✅ Merged
Merged: 6/8/2021
Merged by: @bootandy
Base:
master← Head:master📝 Commits (3)
15a8676Add wrap_help feature to clap551c5d3Simplify conflict implementatione1ffc92Merge branch 'master' into master📊 Changes
3 files changed (+19 additions, -12 deletions)
View changed files
📝
Cargo.lock(+12 -0)📝
Cargo.toml(+5 -6)📝
src/main.rs(+2 -6)📄 Description
Before:
After:
If you add
AppSettings::ColoredHelp, the output can be better:However, currently this cannot work with your
--no-colorsflag. Seehttps://github.com/clap-rs/clap/issues/1880 and https://github.com/clap-rs/clap/issues/1185.
Actually, this not only affects help messages, but also affects error output of clap. (BTW, your current error handling is not consistent with clap's built-in. If you want a more consistent error output, you can check clap::Error. But that will also introduce some problems.)
One compromise is to use
NO_COLORenvironment variable to disable colors. If you like that, I can commit relative codes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.