Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 14, 2023
1 parent 2876153 commit 0b3ce87
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/shell/completions/zsh_complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,14 @@ fn render_command_funcs(cmds: &[&Command]) -> String {
let func = func_name(&cmds);
let args = render_args(&cmds);
let subcommand_funcs = render_command_funcs(&cmds);
formatdoc! {r#"
let s = formatdoc! {r#"
(( $+functions[__{func}_cmd] )) ||
__{func}_cmd() {{
{args}
}}
{subcommand_funcs}"#,
}
.trim()
.to_string()
};
s.trim().to_string()
})
.collect::<Vec<_>>()
.join("\n")
Expand Down

0 comments on commit 0b3ce87

Please sign in to comment.