gn-cli 0.1.7

git-notes CLI — add, list, show, sync, resolve notes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;
use clap::{Args, CommandFactory};
use clap_complete::{generate, Shell};
use std::io;

#[derive(Args)]
pub struct CompletionsArgs {
    /// Shell to generate completions for
    #[arg(value_enum)]
    pub shell: Shell,
}

pub fn run(args: &CompletionsArgs) -> Result<()> {
    let mut cmd = crate::Cli::command();
    generate(args.shell, &mut cmd, "git-notes", &mut io::stdout());
    Ok(())
}