mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
fix(completions/zsh.zsh): Remove redundant code from output
Fixes #1142
This commit is contained in:
parent
d78341f640
commit
0e185b922e
2 changed files with 1 additions and 13 deletions
|
@ -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 {
|
||||
|
|
|
@ -675,13 +675,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