• Home
  • Raw
  • Download

Lines Matching +full:react +full:- +full:is

37     pub(crate) fn new(cmd: &'cmd mut Command) -> Self {  in new()
56 ) -> ClapResult<()> { in get_matches_with()
67 // If the user already passed '--'. Meaning only positional args follow. in get_matches_with()
101 // Has the user already passed '--'? Meaning only positional args follow in get_matches_with()
203 // AllowNegativeNumbers is set, parse_short_arg will *not* throw in get_matches_with()
219 // Is a single dash `-`, try positional. in get_matches_with()
236 .seek(&mut args_cursor, clap_lex::SeekFrom::Current(-1)); in get_matches_with()
239 self.flag_subcmd_skip = self.cur_idx.get() - at + 1; in get_matches_with()
283 // Assume this is a value of a previous arg. in get_matches_with()
372 // Came to -- and one positional has .last(true) set, so we go immediately in get_matches_with()
374 debug!("Parser::get_matches_with: .last(true) and --, setting last pos"); in get_matches_with()
489 ) -> ClapError { in match_arg_error()
490 // If argument follows a `--` in match_arg_error()
553 ) -> Option<&str> { in possible_subcommand()
571 // If there is any ambiguity, fallback to non-infer subcommand in possible_subcommand()
582 fn possible_long_flag_subcommand(&self, arg: &str) -> Option<&str> { in possible_long_flag_subcommand()
615 ) -> ClapResult<std::convert::Infallible> { in parse_help_subcommand()
643 fn is_new_arg(&self, next: &clap_lex::ParsedArg<'_>, current_positional: &Arg) -> bool { in is_new_arg()
644 #![allow(clippy::needless_bool)] // Prefer consistent if/else-if ladder in is_new_arg()
660 // If this is a long flag, this is a new arg. in is_new_arg()
661 debug!("Parser::is_new_arg: --<something> found"); in is_new_arg()
664 // If this is a short flag, this is a new arg. But a singe '-' by in is_new_arg()
665 // itself is a value and typically means "stdin" on unix systems. in is_new_arg()
666 debug!("Parser::is_new_arg: -<something> found"); in is_new_arg()
669 // Nothing special, this is a value. in is_new_arg()
682 ) -> ClapResult<()> { in parse_subcommand()
731 ) -> ClapResult<ParseResult> { in parse_long_arg()
755 "`--` should be filtered out before this point" in parse_long_arg()
815 self.react( in parse_long_arg()
854 ) -> ClapResult<ParseResult> { in parse_short_arg()
898 "tracking of `flag_subcmd_skip` is off for `{short_arg:?}`" in parse_short_arg()
905 arg: format!("-{}", rest.to_str_lossy()), in parse_short_arg()
911 // Check for matching short options, and return the name if there is no trailing in parse_short_arg()
912 // concatenated value: -oval in parse_short_arg()
913 // Option: -o in parse_short_arg()
925 ret = ok!(self.react( in parse_short_arg()
948 // If attached value is not consumed, we may have more short in parse_short_arg()
951 // e.g. `-xvf`, when require_equals && x.min_vals == 0, we don't in parse_short_arg()
973 … // If it is a new flag subcommand, then the formentioned index should be the current one in parse_short_arg()
984 arg: format!("-{c}"), in parse_short_arg()
998 ) -> ClapResult<ParseResult> { in parse_opt_value()
1008 // require_equals is set, but no '=' is provided, try throwing error. in parse_opt_value()
1014 let react_result = ok!(self.react( in parse_opt_value()
1037 let react_result = ok!(self.react( in parse_opt_value()
1057 fn check_terminator(&self, arg: &Arg, val: &RawOsStr) -> Option<ParseResult> { in check_terminator()
1076 ) -> ClapResult<()> { in push_arg_values()
1080 // update the current index because each value is a distinct index to clap in push_arg_values()
1096 fn resolve_pending(&self, matcher: &mut ArgMatcher) -> ClapResult<()> { in resolve_pending()
1106 let _ = ok!(self.react( in resolve_pending()
1118 fn react( in react() method
1126 ) -> ClapResult<ParseResult> { in react()
1130 "Parser::react action={:?}, identifier={:?}, source={:?}", in react()
1143 // We assume this case is valid: require equals, but min_vals == 0. in react()
1145 debug!("Parser::react: has default_missing_vals"); in react()
1183 debug!("Parser::react: cur_idx:={}", self.cur_idx.get()); in react()
1199 … "Parser::react not enough values passed in, leaving it to the validator to complain", in react()
1210 debug!("Parser::react: cur_idx:={}", self.cur_idx.get()); in react()
1216 … "Parser::react not enough values passed in, leaving it to the validator to complain", in react()
1302 fn verify_num_args(&self, arg: &Arg, raw_vals: &[OsString]) -> ClapResult<()> { in verify_num_args()
1311 // Issue 665 (https://github.com/clap-rs/clap/issues/665) in verify_num_args()
1312 // Issue 1105 (https://github.com/clap-rs/clap/issues/1105) in verify_num_args()
1381 fn add_env(&mut self, matcher: &mut ArgMatcher) -> ClapResult<()> { in add_env()
1386 // early return if this is not the case. in add_env()
1397 let _ = ok!(self.react( in add_env()
1411 fn add_defaults(&self, matcher: &mut ArgMatcher) -> ClapResult<()> { in add_defaults()
1422 fn add_default_value(&self, arg: &Arg, matcher: &mut ArgMatcher) -> ClapResult<()> { in add_default_value()
1442 let _ = ok!(self.react( in add_default_value()
1478 let _ = ok!(self.react( in add_default_value()
1520 /// Is only used for the long flag(which is the only one needs fuzzy searching)
1527 ) -> ClapError { in did_you_mean_error()
1565 // `did_you_mean` is a lot more likely and should cause us to skip the `--` suggestion in did_you_mean_error()
1567 // In theory, this is only called for `--long`s, so we don't need to check in did_you_mean_error()
1572 format!("--{arg}"), in did_you_mean_error()
1581 fn help_err(&self, use_long: bool) -> ClapError { in help_err()
1586 fn version_err(&self, use_long: bool) -> ClapError { in version_err()
1606 /// Value attached to the short flag is not consumed(e.g. 'u' for `-cu` is
1609 /// This long flag doesn't need a value but is provided one.
1625 /// No argument found e.g. parser is given `-` when parsing a flag.