typst-cli 0.14.2

The command line interface for Typst.
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::io::stdout;

use clap::CommandFactory;
use clap_complete::generate;

use crate::args::{CliArguments, CompletionsCommand};

/// Execute the completions command.
pub fn completions(command: &CompletionsCommand) {
    let mut cmd = CliArguments::command();
    let bin_name = cmd.get_name().to_string();
    generate(command.shell, &mut cmd, bin_name, &mut stdout());
}