feat: added tab completions to --update-bundle flag

This commit is contained in:
Dark-Alex-17 committed 2026-09-01 12:53:24 -06:00
1 parent affa5e7cef
commit c0a17031c5
5 files changed
+30 -19

No files matched your search

+9
View File
@@ -105,6 +105,15 @@ pub(super) fn macro_completer(current: &OsStr) -> Vec<CompletionCandidate> {
.collect()
}
pub(super) fn bundle_completer(current: &OsStr) -> Vec<CompletionCandidate> {
let cur = current.to_string_lossy();
crate::config::installed_bundle_names()
.into_iter()
.filter(|b| b.starts_with(&*cur))
.map(CompletionCandidate::new)
.collect()
}
fn extract_agent_from_args() -> Option<String> {
let args: Vec<String> = env::args().collect();
let mut i = 0;
+3 -2
View File
@@ -1,8 +1,8 @@
mod completer;
use crate::cli::completer::{
ShellCompletion, agent_completer, macro_completer, mcp_server_completer, model_completer,
rag_completer, role_completer, secrets_completer, session_completer,
ShellCompletion, agent_completer, bundle_completer, macro_completer, mcp_server_completer,
model_completer, rag_completer, role_completer, secrets_completer, session_completer,
};
use crate::config::{AssetCategory, InstallFilter, MemoryScope};
use anyhow::{Context, Result};
@@ -230,6 +230,7 @@ pub struct Cli {
value_name = "NAME",
group = "yes_scope",
conflicts_with_all = ["uninstall"],
add = ArgValueCompleter::new(bundle_completer),
help_heading = "Installation & Updates"
)]
pub update_bundle: Option<String>,