On 2020-01-24 07:07, Robert P. J. Day wrote:
while "man podman-images" states that "created" is the default key
for sorting images, it apparently does not point out that *any*
invalid sort criteria you specify will use the sort criteria of
"created".
i noticed this when i mistyped the sort criteria and, to my
surprise, it worked fine, which now makes sense given the code in
images.go:
func sortImagesOutput(sortBy string, imagesOutput imagesSorted)
imagesSorted {
switch sortBy {
case "id":
sort.Sort(imagesSortedID{imagesOutput})
case "size":
sort.Sort(imagesSortedSize{imagesOutput})
case "tag":
sort.Sort(imagesSortedTag{imagesOutput})
case "repository":
sort.Sort(imagesSortedRepository{imagesOutput})
default:
// default is created time
sort.Sort(imagesSortedCreated{imagesOutput})
is that the intended behaviour? it caught me a bit off-guard.
rday
This sounds like a bug, though I'd need to verify what the Docker
behavior is to be certain. We try to match their CLI interface
whenever we can, so I'd like to be consistent here as well.
Thanks,
Matt Heon
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter:
http://twitter.com/rpjday
LinkedIn:
http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io