falconindy / expac

alpm data extraction utility
91 stars 15 forks source link

Make --humansize more like pacman's default behaviour #45

Closed el-remph closed 2 weeks ago

el-remph commented 3 months ago

--humansize argument is made optional; I've made sure that existing uses of it aren't broken, while in a more natural form for the CLI, when --humansize is given without an SI-ish prefix as an argument, it finds an appropriate unit for each size. eg:

$ expac -H K %m expac pacman
33.30 KiB
4897.76 KiB
$ expac --humansize M %m expac pacman
0.03 MiB
4.78 MiB
$ expac -H %m expac pacman
33.30 KiB
4.78 MiB
falconindy commented 2 months ago

Thanks for the contribution! In general, small features/changes like this should be squashed into a single commit. I don't need to have your own "internal" revision history.

el-remph commented 2 weeks ago

In general, small features/changes like this should be squashed into a single commit

ah yes, sorry about that, this was before I had discovered the joys of the force push (:

falconindy commented 2 weeks ago

Thanks. Merged this with a few changes.