mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
Merge pull request #1144 from segevfiner/zsh-redundant-code
fix(completions/zsh.zsh): Remove redundant code from output
This commit is contained in:
commit
d548e546ef
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…
Add table
Reference in a new issue