Consistent colour printing of headings, task descriptions and IDs.
[todo.git] / todo_tag.ml
index a4ab5a5..8d3ae9c 100644 (file)
@@ -19,7 +19,7 @@ let cmd_tag_list dbh anon_params =
         where tags_tasks.tagid = tags.id
           and tags_tasks.taskid = tasks.id
      order by tags.name, tasks.id" in
-  if rows <> [] then printf "Tags used:\n";
+  if rows <> [] then heading "Tags used";
   let prev = ref None in
   List.iter (
     fun (name, colour, taskid) ->
@@ -31,7 +31,7 @@ let cmd_tag_list dbh anon_params =
       | Some _ -> ()
       );
       prev := Some cur;
-      printf " #%ld" taskid
+      printf " %s" (string_of_taskid taskid)
   ) rows;
   if !prev <> None then printf "\n";
 
@@ -41,7 +41,7 @@ let cmd_tag_list dbh anon_params =
          from tags
         where not exists (select 1 from tags_tasks where tagid = tags.id)
      order by tags.name" in
-  if rows <> [] then printf "Tags not used (delete with 'todo tag-del'):\n";
+  if rows <> [] then heading "Tags not used (delete with 'todo tag-del')";
   List.iter (
     fun (name, colour) ->
       printf "    %s\n" (string_of_tag name colour)