Lines Matching refs:arg_os
692 fn possible_subcommand(&self, arg_os: &OsStr) -> (bool, Option<&str>) { in possible_subcommand()
697 debugln!("Parser::possible_subcommand: arg={:?}", arg_os); in possible_subcommand()
709 if let Some(sc) = find_subcmd!(self, arg_os) { in possible_subcommand()
717 starts(&s.p.meta.name[..], &*arg_os) in possible_subcommand()
725 .filter(|&&(a, _)| starts(a, &*arg_os)) in possible_subcommand()
733 if OsStr::new(sc) == arg_os { in possible_subcommand()
820 fn is_new_arg(&mut self, arg_os: &OsStr, needs_val_of: ParseResult) -> bool { in is_new_arg()
821 debugln!("Parser::is_new_arg:{:?}:{:?}", arg_os, needs_val_of); in is_new_arg()
825 let a = arg_os.to_string_lossy(); in is_new_arg()
858 let mut ret = if arg_os.starts_with(b"--") { in is_new_arg()
860 if arg_os.len() == 2 && !arg_allows_tac { in is_new_arg()
866 } else if arg_os.starts_with(b"-") { in is_new_arg()
869 !(arg_os.len() == 1) in is_new_arg()
916 let arg_os = arg.into(); in get_matches_with() localVariable
919 arg_os, in get_matches_with()
920 &*arg_os.as_bytes() in get_matches_with()
925 let starts_new_arg = self.is_new_arg(&arg_os, needs_val_of); in get_matches_with()
927 && arg_os.starts_with(b"--") in get_matches_with()
928 && arg_os.len() == 2 in get_matches_with()
943 let (is_match, sc_name) = self.possible_subcommand(&arg_os); in get_matches_with()
973 if arg_os.starts_with(b"--") { in get_matches_with()
974 needs_val_of = self.parse_long_arg(matcher, &arg_os, it)?; in get_matches_with()
985 } else if arg_os.starts_with(b"-") && arg_os.len() != 1 { in get_matches_with()
989 needs_val_of = self.parse_short_arg(matcher, &arg_os)?; in get_matches_with()
997 if !(arg_os.to_string_lossy().parse::<i64>().is_ok() in get_matches_with()
998 || arg_os.to_string_lossy().parse::<f64>().is_ok()) in get_matches_with()
1001 &*arg_os.to_string_lossy(), in get_matches_with()
1023 needs_val_of = self.add_val_to_arg(arg, &arg_os, matcher)?; in get_matches_with()
1035 suggestions::did_you_mean(&*arg_os.to_string_lossy(), sc_names!(self)) in get_matches_with()
1038 arg_os.to_string_lossy().into_owned(), in get_matches_with()
1096 &*arg_os.to_string_lossy(), in get_matches_with()
1120 let _ = self.add_val_to_arg(p, &arg_os, matcher)?; in get_matches_with()
1135 let sc_name = match arg_os.to_str() { in get_matches_with()
1144 arg_os.to_string_lossy().into_owned() in get_matches_with()
1168 && arg_os.starts_with(b"-")) in get_matches_with()
1172 &*arg_os.to_string_lossy(), in get_matches_with()
1179 suggestions::did_you_mean(&*arg_os.to_string_lossy(), sc_names!(self)) in get_matches_with()
1182 arg_os.to_string_lossy().into_owned(), in get_matches_with()
1190 arg_os.to_string_lossy().into_owned(), in get_matches_with()
1197 &*arg_os.to_string_lossy(), in get_matches_with()
1696 let arg_os = full_arg.trim_left_matches(b'-'); in parse_short_arg() localVariable
1697 let arg = arg_os.to_string_lossy(); in parse_short_arg()
1743 arg_os.split_at(i).1.as_bytes(), in parse_short_arg()
1744 arg_os.split_at(i).1 in parse_short_arg()
1746 Some(arg_os.split_at(i).1) in parse_short_arg()