Skip to content

Commit 0e185b9

Browse files
committed
fix(completions/zsh.zsh): Remove redundant code from output
Fixes #1142
1 parent d78341f commit 0e185b9

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/completions/mod.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,7 @@ pub fn subcommands_of(p: &Parser) -> Vec<(String, String)> {
9191
p.has_subcommands()
9292
);
9393
if !p.has_subcommands() {
94-
let mut ret = vec![
95-
(
96-
p.meta.name.clone(),
97-
p.meta.bin_name.as_ref().unwrap().clone(),
98-
),
99-
];
94+
let mut ret = vec![];
10095
debugln!("subcommands_of: Looking for aliases...");
10196
if let Some(ref aliases) = p.meta.aliases {
10297
for &(n, _) in aliases {

tests/completions.rs

-7
Original file line numberDiff line numberDiff line change
@@ -675,13 +675,6 @@ _my_app() {
675675
676676
}
677677
678-
(( $+functions[_my_app_commands] )) ||
679-
_my_app_commands() {
680-
local commands; commands=(
681-
682-
)
683-
_describe -t commands 'my_app commands' commands "$@"
684-
}
685678
(( $+functions[_my_app_commands] )) ||
686679
_my_app_commands() {
687680
local commands; commands=(

0 commit comments

Comments
 (0)