使用Rust的Clap crate,我想在帮助屏幕的底部添加一条消息(在所有的标志描述之后)。有没有一种方法可以用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
型
1条答案
按热度按时间fkaflof61#
您正在寻找
after_help
属性字符串
playground