1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

fix(cli): zsh completions (#8718)

This commit is contained in:
crowlKats 2020-12-11 13:18:30 +01:00 committed by GitHub
parent a54ede099d
commit 71d468bec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1213,7 +1213,11 @@ fn permission_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {
fn run_subcommand<'a, 'b>() -> App<'a, 'b> { fn run_subcommand<'a, 'b>() -> App<'a, 'b> {
runtime_args(SubCommand::with_name("run"), true) runtime_args(SubCommand::with_name("run"), true)
.arg(watch_arg()) .arg(
watch_arg()
.conflicts_with("inspect")
.conflicts_with("inspect-brk")
)
.setting(AppSettings::TrailingVarArg) .setting(AppSettings::TrailingVarArg)
.arg( .arg(
script_arg() script_arg()
@ -1487,8 +1491,6 @@ fn watch_arg<'a, 'b>() -> Arg<'a, 'b> {
Arg::with_name("watch") Arg::with_name("watch")
.requires("unstable") .requires("unstable")
.long("watch") .long("watch")
.conflicts_with("inspect")
.conflicts_with("inspect-brk")
.help("Watch for file changes and restart process automatically") .help("Watch for file changes and restart process automatically")
.long_help( .long_help(
"Watch for file changes and restart process automatically. "Watch for file changes and restart process automatically.
@ -2824,7 +2826,7 @@ mod tests {
#[test] #[test]
fn completions() { 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 { match r.subcommand {
DenoSubcommand::Completions { buf } => assert!(!buf.is_empty()), DenoSubcommand::Completions { buf } => assert!(!buf.is_empty()),