[pacman-dev] [PATCH] package.c: prettify package size printing
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Fri Apr 10 04:42:55 UTC 2015
Unnecessary whitespace after the colon in the package size field is
removed by left-justifying the size value.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
src/pacman/package.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 33184bd..ba4f877 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -167,10 +167,10 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
size = humanize_size(alpm_pkg_get_size(pkg), '\0', 2, &label);
if(from == ALPM_PKG_FROM_SYNCDB) {
- printf("%s%s%s %6.2f %s\n", config->colstr.title, _("Download Size :"),
+ printf("%s%s%s %-6.2f %s\n", config->colstr.title, _("Download Size :"),
config->colstr.nocolor, size, label);
} else if(from == ALPM_PKG_FROM_FILE) {
- printf("%s%s%s %6.2f %s\n", config->colstr.title, _("Compressed Size:"),
+ printf("%s%s%s %-6.2f %s\n", config->colstr.title, _("Compressed Size:"),
config->colstr.nocolor, size, label);
} else {
// autodetect size for "Installed Size"
@@ -178,7 +178,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
}
size = humanize_size(alpm_pkg_get_isize(pkg), label[0], 2, &label);
- printf("%s%s%s %6.2f %s\n", config->colstr.title, _("Installed Size :"),
+ printf("%s%s%s %-6.2f %s\n", config->colstr.title, _("Installed Size :"),
config->colstr.nocolor, size, label);
string_display(_("Packager :"), alpm_pkg_get_packager(pkg), cols);
--
2.3.5
More information about the pacman-dev
mailing list