Skip to content

Commit

Permalink
Merge pull request #4204 from chenyukang/wrap-help
Browse files Browse the repository at this point in the history
chore: Wrap help message with max width
  • Loading branch information
zhangsoledad committed Oct 27, 2023
2 parents 5975fda + 27cccad commit 115d891
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion util/app-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[dependencies]
clap = { version = "4", features = ["string"] }
clap = { version = "4", features = ["string", "wrap_help"] }
serde = { version = "1.0", features = ["derive"] }
serde_plain = "0.3.0"
serde_json = "1.0"
Expand Down
7 changes: 4 additions & 3 deletions util/app-config/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pub fn basic_app() -> Command {
.about("Nervos CKB - The Common Knowledge Base")
.subcommand_required(true)
.arg_required_else_help(true)
.term_width(110)
.arg(
Arg::new(ARG_CONFIG_DIR)
.global(true)
Expand Down Expand Up @@ -186,13 +187,13 @@ fn run() -> Command {
.help("This parameter specifies the hash of a block. \
When the height does not reach this block's height, the execution of the script will be disabled, \
that is, skip verifying the script content. \
\
It should be noted that when this option is enabled, the header is first synchronized to \
\n\nIt should be noted that when this option is enabled, the header is first synchronized to \
the highest currently found. During this period, if the assume valid target is found, \
the download of the block starts; If the assume valid target is not found or it's \
timestamp within 24 hours of the current time, the target will automatically become invalid, \
and the download of the block will be started with verify")
).arg(
)
.arg(
Arg::new(ARG_INDEXER)
.long(ARG_INDEXER)
.action(clap::ArgAction::SetTrue)
Expand Down

0 comments on commit 115d891

Please sign in to comment.