Skip to content

Commit

Permalink
Merge pull request containers#13059 from cdoern/clone
Browse files Browse the repository at this point in the history
Implement Podman Container Clone
  • Loading branch information
openshift-merge-robot committed Feb 22, 2022
2 parents 948dfc6 + 94df701 commit fab82a7
Show file tree
Hide file tree
Showing 28 changed files with 1,215 additions and 328 deletions.
14 changes: 14 additions & 0 deletions cmd/podman/common/completion.go
Expand Up @@ -1308,3 +1308,17 @@ func AutocompleteCompressionFormat(cmd *cobra.Command, args []string, toComplete
types := []string{"gzip", "zstd", "zstd:chunked"}
return types, cobra.ShellCompDirectiveNoFileComp
}

// AutocompleteClone - Autocomplete container and image names
func AutocompleteClone(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if !validCurrentCmdLine(cmd, args, toComplete) {
return nil, cobra.ShellCompDirectiveNoFileComp
}
switch len(args) {
case 0:
return getContainers(cmd, toComplete, completeDefault)
case 2:
return getImages(cmd, toComplete)
}
return nil, cobra.ShellCompDirectiveNoFileComp
}

0 comments on commit fab82a7

Please sign in to comment.