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

+15
View File
@@ -9,6 +9,7 @@ use crate::utils::IS_STDOUT_TERMINAL;
use anyhow::{Context, Result, bail};
use chrono::{SecondsFormat, Utc};
use inquire::Confirm;
use log::warn;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use std::collections::BTreeMap;
@@ -637,6 +638,20 @@ pub(crate) fn bundle_list_rows(store: &BundleStore, config_dir: &Path) -> Vec<Bu
.collect()
}
pub(crate) fn installed_bundle_names() -> Vec<String> {
match BundleStore::load() {
Ok(store) => store
.bundle_names()
.into_iter()
.map(str::to_string)
.collect(),
Err(e) => {
warn!("skipping bundle-name completion: {e:#}");
Vec::new()
}
}
}
pub fn list_installed_bundles() -> Result<()> {
let store = BundleStore::load()?;
let rows = bundle_list_rows(&store, &paths::config_dir());