feat: Added static completions via a --completions flag

This commit is contained in:
2025-10-24 10:56:34 -06:00
parent c13142f971
commit 59a3e3012b
5 changed files with 52 additions and 5 deletions
+4 -1
View File
@@ -2,7 +2,7 @@ mod completer;
use crate::cli::completer::{
agent_completer, macro_completer, model_completer, rag_completer, role_completer,
secrets_completer, session_completer,
secrets_completer, session_completer, ShellCompletion,
};
use anyhow::{Context, Result};
use clap::ValueHint;
@@ -130,6 +130,9 @@ pub struct Cli {
/// List all secrets stored in the Loki vault
#[arg(long, exclusive = true)]
pub list_secrets: bool,
/// Generate static shell completion scripts
#[arg(long, value_enum)]
pub completions: Option<ShellCompletion>,
}
impl Cli {