From 15926525954313298f6885925c59800e28b23c1b Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Sat, 21 Oct 2023 00:41:04 +0000 Subject: [PATCH] Use pipes to separate fields on the listing subcommand Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/kosuzu/trunk@53 eb64cd80-c68d-6f47-b6a3-0ada418499da --- cli/listing.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/listing.ml b/cli/listing.ml index 19b232c..6e435ba 100644 --- a/cli/listing.ml +++ b/cli/listing.ml @@ -6,7 +6,7 @@ let listing r order_opt reverse_opt number_opt paths_opt authors_opt topics_opt let dir = if dir = "" then FS.txtdir () else dir in let predicates = A.predicate A.authored authors_opt @ A.predicate A.topics topics_opt in let predicate text = List.fold_left (fun a e -> a && e text) true predicates in - let list_text (t, fnames) = Printf.printf "%s %s %s 𐄁 %s%s\n" + let list_text (t, fnames) = Printf.printf "%s | %s | %s | %s %s\n" (Text.short_id t) Date.(pretty_date @@ listing t.Text.date) (Person.Set.to_string ~names_only:true t.Text.authors) t.Text.title (if paths_opt then (List.fold_left (Printf.sprintf "%s\n@ %s") "" fnames) else "")