Closed adfx closed 1 year ago
If I understand you corretly you want to change the output format, this is possible with the --format flag
The currrent default format set is (see options.go):
"table {{.ID}}\\t{{.Names}}\\t{{.ImageName}}\\t{{.Tag}}\\t{{.ShortCommand}}\\t{{.CreatedAt}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}\\t{{.Networks}}\\t{{.IP}}",
"table {{.ID}}\\t{{.Names}}\\t{{.ImageName}}\\t{{.Tag}}\\t{{.ShortCommand}}\\t{{.CreatedAt}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}\\t{{.IP}}",
"table {{.ID}}\\t{{.Names}}\\t{{.ImageName}}\\t{{.Tag}}\\t{{.CreatedAt}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}\\t{{.IP}}",
"table {{.ID}}\\t{{.Names}}\\t{{.ImageName}}\\t{{.Tag}}\\t{{.CreatedAt}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}",
"table {{.ID}}\\t{{.Names}}\\t{{.ImageName}}\\t{{.Tag}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}",
"table {{.ID}}\\t{{.Names}}\\t{{.Tag}}\\t{{.State}}\\t{{.Status}}\\t{{.Ports}}",
"table {{.ID}}\\t{{.Names}}\\t{{.Tag}}\\t{{.State}}\\t{{.Status}}",
"table {{.ID}}\\t{{.Names}}\\t{{.State}}\\t{{.Status}}",
"table {{.ID}}\\t{{.Names}}\\t{{.State}}",
"table {{.Names}}\\t{{.State}}",
"table {{.Names}}",
"table {{.ID}}",
(the first specification that fits in your terminal is used)
You can override these by supplying a --format string, if you have more than one --format parameter the first one that fits in your terminal will be used (same logic as with the default ones).
Hope that helps and Merry Christmas, ~ Mike
(Edit:) I guess I didn't really explain that in the README, I will add a section to it
Moin Mike,
auch dir frohe Weihnachten :)
Das --format flag habe ich ausprobiert, jedoch ging dann jedes mal die tolle Tabelle flöten :(
Ich checke mal die von dir geschickten Vorschläge der ...table{xyz... und melde mich ggf. Noch mal.
Besten Dank für dein geniales Tool. In dem default setiings gefällt mir das schon richtig gut. Ich brauche aber im Grunde nur name, IP, ports. Ich probiere mich da noch mal durch
VG Eddy
I just had time to test. Works like a charme. Don't know why I had issues getting that on my own. Maybe just finger trouble.
Very good work, thank you for that.
Maybe I do not understand the --help fully, but as soon as I use the --format flag it turns out to look like the original "docker ps". For my use case it would be very handy to drop several columns used in dops and add others given in help. Therefore I'd like --format using as a customizable of showing columns.
Thanks anyways for your work, This helps me a lot