(path)
| 134 | } |
| 135 | |
| 136 | function pathInBox(path) { |
| 137 | // 7-space lead = box pad (2) + prose indent (3) + nesting under |
| 138 | // label (2). We intentionally do NOT truncate overflowing content: |
| 139 | // for command lines (`sudo rm <path>`, `mv <a> <b>`), left-truncation |
| 140 | // would swallow the command verb and leave the user with |
| 141 | // un-copy-pasteable instructions. Long lines just overflow the box |
| 142 | // border, which is visually less pretty but keeps the content |
| 143 | // intact. |
| 144 | const lead = ' '.repeat(BOX_PAD_LEFT + 5); |
| 145 | return lead + color(C_CYAN, path); |
| 146 | } |
| 147 | |
| 148 | function successHeading(text) { |
| 149 | return pad(color(C_BOLD_GREEN, '✓ ' + text)); |
no test coverage detected