gpt4 book ai didi

rust - 使用多于一个的短值字母

转载 作者:行者123 更新时间:2023-12-03 11:36:20 24 4
gpt4 key购买 nike

我正在使用clap解析参数。我想在参数中使用单破折号(-)和多个字符,例如-Fmin 1。添加long("Fmin")给了我,但带有两个破折号(-)。
我知道通常将破折号和单个字符一起使用。但是在使用short()形式时,是否可能会鼓掌使用多个字符?还是覆盖长格式,使其默认为一个破折号?

let matches = App::new("clap")
.arg(Arg::with_name("Fmin")
.required(false)
.takes_value(true)
.short("Fmin")
.multiple(false)
.possible_values(&["min"])
)
.get_matches();

最佳答案

is it possible to have clap use more than a single character when using the short() form? Or override the long-form so it defaults to a single dash?


根据 this issue的判断,拍手还不支持单连字符长选项。

关于rust - 使用多于一个的短值字母,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65766459/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com