diff --git a/clap_generate/src/generators/shells/zsh.rs b/clap_generate/src/generators/shells/zsh.rs index 9217a06d086f..0000371aaf87 100644 --- a/clap_generate/src/generators/shells/zsh.rs +++ b/clap_generate/src/generators/shells/zsh.rs @@ -535,7 +535,7 @@ fn write_positionals_of(p: &App) -> String { .replace("[", "\\[") .replace("]", "\\]") .replace(":", "\\:"), - value_completion = value_completion(arg).unwrap_or("".to_string()) + value_completion = value_completion(arg).unwrap_or_else(|| "".to_string()) ); debug!("write_positionals_of:iter: Wrote...{}", a);