mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Merge branch 'master' into zsh-completion-improvements
This commit is contained in:
commit
e077e0c930
4 changed files with 4 additions and 16 deletions
|
@ -10,6 +10,6 @@ fn main() {
|
|||
.author(crate_authors!())
|
||||
.get_matches();
|
||||
|
||||
// running the this app with the -h will display whatever author(s) are in your
|
||||
// running this app with -h will display whatever author(s) are in your
|
||||
// Cargo.toml
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1304,7 +1304,7 @@ impl<'a, 'b> App<'a, 'b> {
|
|||
|
||||
/// Generate a completions file for a specified shell at compile time.
|
||||
///
|
||||
/// **NOTE:** to generate the this file at compile time you must use a `build.rs` "Build Script"
|
||||
/// **NOTE:** to generate the file at compile time you must use a `build.rs` "Build Script"
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
|
@ -91,12 +91,7 @@ pub fn subcommands_of(p: &Parser) -> Vec<(String, String)> {
|
|||
p.has_subcommands()
|
||||
);
|
||||
if !p.has_subcommands() {
|
||||
let mut ret = vec![
|
||||
(
|
||||
p.meta.name.clone(),
|
||||
p.meta.bin_name.as_ref().unwrap().clone(),
|
||||
),
|
||||
];
|
||||
let mut ret = vec![];
|
||||
debugln!("subcommands_of: Looking for aliases...");
|
||||
if let Some(ref aliases) = p.meta.aliases {
|
||||
for &(n, _) in aliases {
|
||||
|
|
|
@ -700,13 +700,6 @@ _my_app() {
|
|||
|
||||
}
|
||||
|
||||
(( $+functions[_my_app_commands] )) ||
|
||||
_my_app_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'my_app commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_my_app_commands] )) ||
|
||||
_my_app_commands() {
|
||||
local commands; commands=(
|
||||
|
|
Loading…
Reference in a new issue