使用 Rust 的Clap箱,我想在帮助屏幕的底部添加一条消息(在所有标志描述之后)。有没有办法用 来做到这一点clap-derive
?
#[derive(Parser, Debug, Default)]
#[command(about, version)]
pub struct Args {
/// Path to a file.
#[arg(short, long)]
pub file: Option<PathBuf>,
}
预期输出:
MyProgram ...
--file FILE Path to a file
Some very long explanation that should be printed at the end of the help screen
您正在寻找
after_help
房产操场