Skip to content

Commit

Permalink
fix(cli): zsh completions (denoland#8718)
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Dec 11, 2020
1 parent a54ede0 commit 71d468b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cli/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()),
Expand Down

0 comments on commit 71d468b

Please sign in to comment.