Lines Matching full:usage
11 // Creates a usage string for display. This happens just after all arguments were parsed, but before
12 // any subcommands have been parsed (so as to give subcommands their own usage recursively)
14 debugln!("usage::create_usage_with_title;"); in create_usage_with_title()
15 let mut usage = String::with_capacity(75); in create_usage_with_title() localVariable
16 usage.push_str("USAGE:\n "); in create_usage_with_title()
17 usage.push_str(&*create_usage_no_title(p, used)); in create_usage_with_title()
18 usage in create_usage_with_title()
21 // Creates a usage string to be used in error message (i.e. one with currently used args)
47 // Creates a usage string (*without title*) if one was not provided by the user manually.
49 debugln!("usage::create_usage_no_title;"); in create_usage_no_title()
59 // Creates a usage string for display in help messages (i.e. not for errors)
61 let mut usage = String::with_capacity(75); in create_help_usage() localVariable
64 .usage in create_help_usage()
67 usage.push_str(&*name); in create_help_usage()
81 usage.push_str(" [FLAGS]"); in create_help_usage()
83 usage.push_str(" [OPTIONS]"); in create_help_usage()
90 usage.push_str(" [OPTIONS]"); in create_help_usage()
93 usage.push_str(&req_string[..]); in create_help_usage()
96 // places a '--' in the usage string if there are args and options in create_help_usage()
105 usage.push_str(" [--]"); in create_help_usage()
113 usage.push_str(&*args_tag); in create_help_usage()
115 usage.push_str(" [ARGS]"); in create_help_usage()
123 debugln!("usage::create_help_usage: '{}' has .last(true)", pos.name()); in create_help_usage()
130 usage.push_str(" -- <"); in create_help_usage()
132 usage.push_str(" [--] <"); in create_help_usage()
134 usage.push_str(" [-- <"); in create_help_usage()
136 usage.push_str(&*pos.name_no_brackets()); in create_help_usage()
137 usage.push_str(">"); in create_help_usage()
138 usage.push_str(pos.multiple_str()); in create_help_usage()
140 usage.push_str("]"); in create_help_usage()
149 usage.push_str("\n "); in create_help_usage()
150 usage.push_str(&*create_help_usage(p, false)); in create_help_usage()
151 usage.push_str(" <SUBCOMMAND>"); in create_help_usage()
153 usage.push_str("\n "); in create_help_usage()
154 usage.push_str(&*name); in create_help_usage()
155 usage.push_str(" <SUBCOMMAND>"); in create_help_usage()
158 usage.push_str(" <SUBCOMMAND>"); in create_help_usage()
160 usage.push_str(" [SUBCOMMAND]"); in create_help_usage()
163 usage.shrink_to_fit(); in create_help_usage()
164 debugln!("usage::create_help_usage: usage={}", usage); in create_help_usage()
165 usage in create_help_usage()
168 // Creates a context aware usage string, or "smart usage" from currently used
171 debugln!("usage::smart_usage;"); in create_smart_usage()
172 let mut usage = String::with_capacity(75); in create_smart_usage() localVariable
180 usage.push_str( in create_smart_usage()
182 .usage in create_smart_usage()
186 usage.push_str(&*r_string); in create_smart_usage()
188 usage.push_str(" <SUBCOMMAND>"); in create_smart_usage()
190 usage.shrink_to_fit(); in create_smart_usage()
191 usage in create_smart_usage()
194 // Gets the `[ARGS]` tag for the usage string
196 debugln!("usage::get_args_tag;"); in get_args_tag()
205 debugln!("usage::get_args_tag:iter:{}:", pos.b.name); in get_args_tag()
208 debugln!("usage::get_args_tag:iter:{}:iter:{};", pos.b.name, grp_s); in get_args_tag()
217 "usage::get_args_tag:iter: {} Args not required or hidden", in get_args_tag()
222 debugln!("usage::get_args_tag:iter: More than one, returning [ARGS]"); in get_args_tag()
235 "usage::get_args_tag:iter: Exactly one, returning '{}'", in get_args_tag()
244 debugln!("usage::get_args_tag:iter: Don't collapse returning all"); in get_args_tag()
256 debugln!("usage::get_args_tag:iter: incl_reqs=false, building secondary usage string"); in get_args_tag()
290 // Determines if we need the `[FLAGS]` tag in the usage string
292 debugln!("usage::needs_flags_tag;"); in needs_flags_tag()
294 debugln!("usage::needs_flags_tag:iter: f={};", f.b.name); in needs_flags_tag()
303 debugln!("usage::needs_flags_tag:iter:iter: grp_s={};", grp_s); in needs_flags_tag()
305 debugln!("usage::needs_flags_tag:iter:iter: Group is required"); in needs_flags_tag()
313 debugln!("usage::needs_flags_tag:iter: [FLAGS] required"); in needs_flags_tag()
317 debugln!("usage::needs_flags_tag: [FLAGS] not required"); in needs_flags_tag()
321 // Returns the required args in usage string form by fully unrolling all groups
330 "usage::get_required_usage_from: reqs={:?}, extra={:?}", in get_required_usage_from()
349 "usage::get_required_usage_from:iter:{}: adding group req={:?}", in get_required_usage_from()
369 "usage::get_required_usage_from:iter:{}: adding arg req={:?}", in get_required_usage_from()
388 "usage::get_required_usage_from: after init desc_reqs={:?}", in get_required_usage_from()
400 debugln!("usage::get_required_usage_from: no more children"); in get_required_usage_from()
403 debugln!("usage::get_required_usage_from: after iter tmp={:?}", tmp); in get_required_usage_from()
405 "usage::get_required_usage_from: after iter new_reqs={:?}", in get_required_usage_from()
412 "usage::get_required_usage_from: after iter desc_reqs={:?}", in get_required_usage_from()
421 "usage::get_required_usage_from: final desc_reqs={:?}", in get_required_usage_from()
453 "usage::get_required_usage_from: args_in_groups={:?}", in get_required_usage_from()
469 debugln!("usage::get_required_usage_from:iter:{}:", a); in get_required_usage_from()