dfslkjelf

This commit is contained in:
nose
2025-12-18 22:50:21 -08:00
parent 76691dbbf5
commit d637532237
16 changed files with 2587 additions and 299 deletions

25
CLI.py
View File

@@ -549,6 +549,20 @@ def _get_cmdlet_args(cmd_name: str) -> List[str]:
return []
def get_store_choices() -> List[str]:
"""Return configured store backend names.
This is the same list used for REPL/Typer autocomplete for `-store`.
"""
try:
from Store import Store
storage = Store(_load_cli_config(), suppress_debug=True)
backends = storage.list_backends()
return list(backends or [])
except Exception:
return []
def _get_arg_choices(cmd_name: str, arg_name: str) -> List[str]:
"""Get list of valid choices for a specific cmdlet argument."""
try:
@@ -558,14 +572,9 @@ def _get_arg_choices(cmd_name: str, arg_name: str) -> List[str]:
# Dynamic storage backends: use current config to enumerate available storages
# Support both "storage" and "store" argument names
if normalized_arg in ("storage", "store"):
try:
from Store import Store
storage = Store(_load_cli_config(), suppress_debug=True)
backends = storage.list_backends()
if backends:
return backends
except Exception:
pass
backends = get_store_choices()
if backends:
return backends
# Dynamic search providers
if normalized_arg == "provider":