mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 19:56:06 +00:00
Register cobra completion callbacks for all commands that accept existing Velero resource names. A centralized completeNames helper uses apimachinery's meta.ExtractList/Accessor to list resources with a 3-second timeout, filter by prefix, and deduplicate already-typed arguments. Wires ValidArgsFunction on 20 commands and RegisterFlagCompletionFunc on 9 flags across backup, restore, schedule, backuplocation, snapshotlocation, repo, and debug. Closes #9782 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>