[pacman-dev] [PATCH 14/16] colourize -Sl/-Ql

Simon Gomizelj simongmzlj at gmail.com
Fri Mar 1 16:32:43 EST 2013


Signed-off-by: Simon Gomizelj <simongmzlj at gmail.com>
---
 src/pacman/package.c | 7 ++-----
 src/pacman/sync.c    | 5 +++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/pacman/package.c b/src/pacman/package.c
index db2cf76..cb4bb8b 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -303,12 +303,9 @@ void dump_pkg_files(alpm_pkg_t *pkg, int quiet)
 		 * Quiet  : '<root><filepath>\n'
 		 */
 		if(!quiet) {
-			fputs(pkgname, stdout);
-			putchar(' ');
+			printf("%s%s%s ", colstr.title, pkgname, colstr.nc);
 		}
-		fputs(root, stdout);
-		fputs(file->name, stdout);
-		putchar('\n');
+		printf("%s%s\n", root, file->name);
 	}
 
 	fflush(stdout);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 12e965b..a2248d3 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -523,8 +523,9 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
 			alpm_pkg_t *pkg = j->data;
 
 			if(!config->quiet) {
-				printf("%s %s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg),
-						alpm_pkg_get_version(pkg));
+				printf("%s%s %s%s %s%s%s", colstr.repo, alpm_db_get_name(db),
+						colstr.title, alpm_pkg_get_name(pkg),
+						colstr.version, alpm_pkg_get_version(pkg), colstr.nc);
 				print_installed(db_local, pkg);
 				printf("\n");
 			} else {
-- 
1.8.1.4



More information about the pacman-dev mailing list