feat: add shell completions

This commit is contained in:
Moritz Böhme 2023-08-25 18:18:45 +02:00
parent 00d3c0ce84
commit f7aa8942e0
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
5 changed files with 66 additions and 3 deletions

View file

@ -1,5 +1,5 @@
use crate::daemon::{Answer, AnswerErr, Command as OtherCommand};
use crate::run_path;
use crate::helper::run_path;
use anyhow::{Context, Result};
use clap::{Parser, Subcommand};
use std::net::Shutdown;
@ -56,6 +56,12 @@ pub enum Command {
#[command(subcommand)]
#[clap(visible_alias = "p")]
Pomodoro(PomodoroCommand),
/// Shell completions
Completions {
#[arg(value_enum)]
shell: clap_complete_command::Shell,
}
}
#[derive(Debug, Subcommand)]