Home
last modified time | relevance | path

Searched refs:ValueHint (Results 1 – 19 of 19) sorted by relevance

/third_party/rust/crates/clap/src/builder/
Dvalue_hint.rs29 pub enum ValueHint { enum
69 impl Default for ValueHint { implementation
71 ValueHint::Unknown in default()
75 impl FromStr for ValueHint { implementation
79 "unknown" => ValueHint::Unknown, in from_str()
80 "other" => ValueHint::Other, in from_str()
81 "anypath" => ValueHint::AnyPath, in from_str()
82 "filepath" => ValueHint::FilePath, in from_str()
83 "dirpath" => ValueHint::DirPath, in from_str()
84 "executablepath" => ValueHint::ExecutablePath, in from_str()
[all …]
Dresettable.rs8 use crate::builder::ValueHint;
96 impl IntoResettable<ValueHint> for Option<ValueHint> {
97 fn into_resettable(self) -> Resettable<ValueHint> { in into_resettable() argument
165 impl IntoResettable<ValueHint> for ValueHint { implementation
166 fn into_resettable(self) -> Resettable<ValueHint> { in into_resettable() argument
Ddebug_asserts.rs12 use crate::{Arg, Command, ValueHint};
265 if arg.get_value_hint() == ValueHint::CommandWithArguments { in assert_app()
725 if arg.get_value_hint() != ValueHint::Unknown { in assert_arg()
732 if arg.get_value_hint() == ValueHint::CommandWithArguments { in assert_arg()
Darg.rs23 use crate::ValueHint;
85 pub(crate) value_hint: Option<ValueHint>,
1254 pub fn value_hint(mut self, value_hint: impl IntoResettable<ValueHint>) -> Self { in value_hint()
3875 pub fn get_value_hint(&self) -> ValueHint { in get_value_hint() argument
3880 ValueHint::AnyPath in get_value_hint()
3882 ValueHint::default() in get_value_hint()
3885 ValueHint::default() in get_value_hint()
Dmod.rs37 pub use value_hint::ValueHint;
/third_party/rust/crates/clap/clap_complete/examples/
Dcompletion-derive.rs15 use clap::{Args, Command, CommandFactory, Parser, Subcommand, ValueHint};
34 ValueHint(ValueHintOpt), enumerator
40 #[arg(long, value_hint = ValueHint::Unknown)]
42 #[arg(long, value_hint = ValueHint::Other)]
44 #[arg(short, long, value_hint = ValueHint::AnyPath)]
46 #[arg(short, long, value_hint = ValueHint::FilePath)]
48 #[arg(short, long, value_hint = ValueHint::DirPath)]
50 #[arg(short, long, value_hint = ValueHint::ExecutablePath)]
52 #[arg(long, value_hint = ValueHint::CommandName)]
54 #[arg(short, long, value_hint = ValueHint::CommandString)]
[all …]
Dcompletion.rs15 use clap::{value_parser, Arg, Command, ValueHint};
25 .value_hint(ValueHint::Unknown), in build_cli()
27 .arg(Arg::new("other").long("other").value_hint(ValueHint::Other)) in build_cli()
32 .value_hint(ValueHint::AnyPath), in build_cli()
38 .value_hint(ValueHint::FilePath), in build_cli()
44 .value_hint(ValueHint::DirPath), in build_cli()
50 .value_hint(ValueHint::ExecutablePath), in build_cli()
55 .value_hint(ValueHint::CommandName), in build_cli()
61 .value_hint(ValueHint::CommandString), in build_cli()
68 .value_hint(ValueHint::CommandWithArguments), in build_cli()
[all …]
Ddynamic.rs10 .value_hint(clap::ValueHint::FilePath), in command()
/third_party/rust/crates/clap/clap_complete_fig/tests/
Dcommon.rs31 .value_hint(clap::ValueHint::FilePath) in feature_sample_command()
177 .value_hint(clap::ValueHint::Unknown), in value_hint_command()
182 .value_hint(clap::ValueHint::Other), in value_hint_command()
188 .value_hint(clap::ValueHint::AnyPath), in value_hint_command()
194 .value_hint(clap::ValueHint::FilePath), in value_hint_command()
200 .value_hint(clap::ValueHint::DirPath), in value_hint_command()
206 .value_hint(clap::ValueHint::ExecutablePath), in value_hint_command()
211 .value_hint(clap::ValueHint::CommandName), in value_hint_command()
217 .value_hint(clap::ValueHint::CommandString), in value_hint_command()
224 .value_hint(clap::ValueHint::CommandWithArguments), in value_hint_command()
[all …]
/third_party/rust/crates/clap/clap_complete/tests/
Dcommon.rs33 .value_hint(clap::ValueHint::FilePath) in feature_sample_command()
182 .value_hint(clap::ValueHint::Unknown), in value_hint_command()
187 .value_hint(clap::ValueHint::Other), in value_hint_command()
193 .value_hint(clap::ValueHint::AnyPath), in value_hint_command()
199 .value_hint(clap::ValueHint::FilePath), in value_hint_command()
205 .value_hint(clap::ValueHint::DirPath), in value_hint_command()
211 .value_hint(clap::ValueHint::ExecutablePath), in value_hint_command()
216 .value_hint(clap::ValueHint::CommandName), in value_hint_command()
222 .value_hint(clap::ValueHint::CommandString), in value_hint_command()
229 .value_hint(clap::ValueHint::CommandWithArguments), in value_hint_command()
[all …]
Dgeneral.rs10 assert_eq!(input.get_value_hint(), clap::builder::ValueHint::AnyPath); in infer_value_hint_for_path_buf()
/third_party/rust/crates/clap/clap_mangen/tests/
Dcommon.rs33 .value_hint(clap::ValueHint::FilePath) in feature_sample_command()
175 .value_hint(clap::ValueHint::Unknown), in value_hint_command()
180 .value_hint(clap::ValueHint::Other), in value_hint_command()
186 .value_hint(clap::ValueHint::AnyPath), in value_hint_command()
192 .value_hint(clap::ValueHint::FilePath), in value_hint_command()
198 .value_hint(clap::ValueHint::DirPath), in value_hint_command()
204 .value_hint(clap::ValueHint::ExecutablePath), in value_hint_command()
209 .value_hint(clap::ValueHint::CommandName), in value_hint_command()
215 .value_hint(clap::ValueHint::CommandString), in value_hint_command()
222 .value_hint(clap::ValueHint::CommandWithArguments), in value_hint_command()
[all …]
/third_party/rust/crates/clap/clap_complete/src/shells/
Dfish.rs183 ValueHint::Unknown => " -r", in value_completion()
185 ValueHint::AnyPath | ValueHint::FilePath | ValueHint::ExecutablePath => " -r -F", in value_completion()
186 ValueHint::DirPath => " -r -f -a \"(__fish_complete_directories)\"", in value_completion()
189 ValueHint::CommandString | ValueHint::CommandName => { in value_completion()
192 ValueHint::Username => " -r -f -a \"(__fish_complete_users)\"", in value_completion()
193 ValueHint::Hostname => " -r -f -a \"(__fish_print_hostnames)\"", in value_completion()
Dzsh.rs396 ValueHint::Unknown => {
399 ValueHint::Other => "( )",
400 ValueHint::AnyPath => "_files",
401 ValueHint::FilePath => "_files",
402 ValueHint::DirPath => "_files -/",
403 ValueHint::ExecutablePath => "_absolute_command_paths",
404 ValueHint::CommandName => "_command_names -e",
405 ValueHint::CommandString => "_cmdstring",
406 ValueHint::CommandWithArguments => "_cmdambivalent",
407 ValueHint::Username => "_users",
[all …]
/third_party/rust/crates/clap/clap_complete/src/
Ddynamic.rs451 clap::ValueHint::Other => { in complete_arg_value()
454 clap::ValueHint::Unknown | clap::ValueHint::AnyPath => { in complete_arg_value()
457 clap::ValueHint::FilePath => { in complete_arg_value()
460 clap::ValueHint::DirPath => { in complete_arg_value()
463 clap::ValueHint::ExecutablePath => { in complete_arg_value()
467 clap::ValueHint::CommandName in complete_arg_value()
468 | clap::ValueHint::CommandString in complete_arg_value()
469 | clap::ValueHint::CommandWithArguments in complete_arg_value()
470 | clap::ValueHint::Username in complete_arg_value()
471 | clap::ValueHint::Hostname in complete_arg_value()
[all …]
/third_party/rust/crates/clap/clap_complete_fig/src/
Dfig.rs438 ValueHint::AnyPath | ValueHint::FilePath | ValueHint::ExecutablePath => { in gen_args()
447 ValueHint::DirPath => { in gen_args()
456 ValueHint::CommandString | ValueHint::CommandName | ValueHint::CommandWithArguments => { in gen_args()
/third_party/rust/crates/clap/src/
Dlib.rs102 pub use crate::builder::ValueHint;
/third_party/rust/crates/clap/examples/
Dtyped-derive.rs13 #[arg(short = 'I', value_name = "DIR", value_hint = clap::ValueHint::DirPath)]
/third_party/rust/crates/clap/
DCHANGELOG.md172 - Allow using `Arg::last(true)` with `Arg::value_hint(ValueHint::CommandWithArguments)`
712 - `clap::{PossibleValue, ValueHint}` to `clap::builder::{PossibleValue, ValueHint}`
759 - `PathBuf` value parsers imply `ValueHint::AnyPath` for completions (#3732)
1294 - Added `#[non_exhaustive]` to `clap::{ValueHint, ErrorKind, AppSettings, ArgSettings}` ([clap-rs/c…