From 71d468bec0ad121d4fafb2cf1d45cecd071e3327 Mon Sep 17 00:00:00 2001 From: crowlKats <13135287+crowlKats@users.noreply.github.com> Date: Fri, 11 Dec 2020 13:18:30 +0100 Subject: [PATCH] fix(cli): zsh completions (#8718) --- cli/flags.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cli/flags.rs b/cli/flags.rs index be93015f56..ae5ef15be5 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1213,7 +1213,11 @@ fn permission_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> { fn run_subcommand<'a, 'b>() -> App<'a, 'b> { runtime_args(SubCommand::with_name("run"), true) - .arg(watch_arg()) + .arg( + watch_arg() + .conflicts_with("inspect") + .conflicts_with("inspect-brk") + ) .setting(AppSettings::TrailingVarArg) .arg( script_arg() @@ -1487,8 +1491,6 @@ fn watch_arg<'a, 'b>() -> Arg<'a, 'b> { Arg::with_name("watch") .requires("unstable") .long("watch") - .conflicts_with("inspect") - .conflicts_with("inspect-brk") .help("Watch for file changes and restart process automatically") .long_help( "Watch for file changes and restart process automatically. @@ -2824,7 +2826,7 @@ mod tests { #[test] fn completions() { - let r = flags_from_vec_safe(svec!["deno", "completions", "bash"]).unwrap(); + let r = flags_from_vec_safe(svec!["deno", "completions", "zsh"]).unwrap(); match r.subcommand { DenoSubcommand::Completions { buf } => assert!(!buf.is_empty()),