Skip to main content

Module output_blocks

Module output_blocks 

Source
Expand description

Output formatting utilities for nicely rendered command blocks

Provides “timeline” format: a width-independent, lossless output format that works in TTY, tmux, SSH, CI, and logs.

Core concepts:

  • prefix → tool metadata (timeline marker)
  • $ → executed command (virtual or user command)
  • No prefix → program output (stdout/stderr)
  • Result marker ( / ) appears after output

Structs§

FinishBlockOptions
Options for creating a finish block
IsolationMetadata
Parsed isolation metadata
StartBlockOptions
Options for creating a start block

Constants§

FAILURE_MARKER
Failure result marker
SPINEDeprecated
Alias for backward compatibility
SUCCESS_MARKER
Success result marker
TIMELINE_MARKER
Timeline marker character (formerly called “spine”) Used to prefix metadata lines in the timeline format

Functions§

create_command_line
Create a command line with $ prefix
create_empty_spine_lineDeprecated
Alias for backward compatibility
create_empty_timeline_line
Create an empty timeline line (just the timeline marker character)
create_finish_block
Create a finish block for command execution using timeline format
create_spine_lineDeprecated
Alias for backward compatibility
create_start_block
Create a start block for command execution using timeline format
create_timeline_line
Create a metadata line with timeline marker prefix
create_timeline_separator
Create a separator line between virtual commands and user commands
create_virtual_command_block
Create a virtual command block for setup steps (like docker pull) Virtual commands are displayed separately in the timeline to show intermediate steps that the tool performs automatically
create_virtual_command_result
Create a result marker line for a virtual command
escape_for_links_notation
Escape a value for Links notation Smart quoting: uses single or double quotes based on content
format_duration
Format duration in seconds with appropriate precision
format_value_for_links_notation
Format a serde_json::Value for Links notation
generate_isolation_lines
Generate isolation metadata lines for timeline format
get_result_marker
Get the result marker based on exit code
parse_isolation_metadata
Parse isolation metadata from extra lines