Skip to main content

format_copy_block

Function format_copy_block 

Source
pub fn format_copy_block(lines: &[&str], color: bool) -> String
Expand description

Format a “copy this” block — content framed by horizontal rules but with no vertical border characters, so the user can select and paste the content directly without stripping symbols.

  ── copy ─────────────────────────────────────────────────
    "seshat": {
      "command": "seshat"
    }
  ─────────────────────────────────────────────────────────
  • Top rule contains " copy " as a visual cue.
  • Both rules are dimmed when color is true.
  • Content lines are printed with 4-space indent, default terminal color.
  • Width is fixed at HEADER_WIDTH characters (60), matching section headers.