Skip to main content

Module utils

Module utils 

Source
Expand description

Path formatting, terminal hyperlink, and tag-coloring helpers. Path formatting, terminal hyperlink, and tag-coloring helpers.

Functions§

colorize_tag
Colors tag by its derived TodoPriority, or returns it unchanged if options.colored is off.
format_path
Formats path per options: absolute if options.full_paths, relative to options.base_path if set, else as-is.
make_clickable_link
Builds an OSC 8 terminal hyperlink to path at line, showing the formatted path as link text. Returns None if options.clickable_links is off or the terminal doesn’t advertise hyperlink support.
make_line_link
Builds an OSC 8 terminal hyperlink to path at line, showing "L{line}" as link text. Returns None under the same conditions as make_clickable_link.