Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/podman/common/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ func AutocompleteCreateRun(cmd *cobra.Command, args []string, toComplete string)
return nil, cobra.ShellCompDirectiveNoFileComp
}
if len(args) < 1 {
// check if the rootfs flag is set
// if it is set to true provide directory completion
rootfs, err := cmd.Flags().GetBool("rootfs")
if err == nil && rootfs {
return nil, cobra.ShellCompDirectiveFilterDirs
}
return getImages(cmd, toComplete)
}
// TODO: add path completion for files in the image
Expand Down