From 6e089b421bc7bc4aaf1d56faf4754319b996a503 Mon Sep 17 00:00:00 2001 From: Byounguk Lee Date: Tue, 12 May 2026 01:17:37 +0000 Subject: [PATCH] completion: add artifact support to podman inspect Autocompletion for `podman inspect` now includes artifact names, matching the behavior of other object types like containers, images, pods, networks, and volumes. Signed-off-by: Byounguk Lee --- cmd/podman/common/completion.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go index 0f167cfb23..676e67fcf0 100644 --- a/cmd/podman/common/completion.go +++ b/cmd/podman/common/completion.go @@ -998,13 +998,16 @@ func AutocompleteInspect(cmd *cobra.Command, args []string, toComplete string) ( pods, _ := getPods(cmd, toComplete, completeDefault) networks, _ := getNetworks(cmd, toComplete, completeDefault) volumes, _ := getVolumes(cmd, toComplete) + artifact, _ := getArtifacts(cmd, toComplete) - suggestions := make([]string, 0, len(containers)+len(images)+len(pods)+len(networks)+len(volumes)) + suggestions := make([]string, 0, len(containers)+len(images)+len(pods)+len(networks)+len(volumes)+len(artifact)) suggestions = append(suggestions, containers...) suggestions = append(suggestions, images...) suggestions = append(suggestions, pods...) suggestions = append(suggestions, networks...) suggestions = append(suggestions, volumes...) + suggestions = append(suggestions, artifact...) + return suggestions, cobra.ShellCompDirectiveNoFileComp }