Skip to content

Commit

Permalink
fix(completions/zsh.zsh): Remove redundant code from output
Browse files Browse the repository at this point in the history
Fixes #1142
  • Loading branch information
segevfiner committed Jan 10, 2018
1 parent d78341f commit 0e185b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
7 changes: 1 addition & 6 deletions src/completions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 0 additions & 7 deletions tests/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand Down

0 comments on commit 0e185b9

Please sign in to comment.