padz 1.2.0

An ergonomic, context-aware scratch pad for the terminal — a good Unix citizen
1
2
3
4
5
6
7
8
{#- Search match lines for a pad -#}
{#- Expects: pad.left_pad, pad.matches (list of {line_number, segments}), pad.more_matches_count -#}
{%- for match in pad.matches -%}
    {{ pad.left_pad }}    [line-number]{{ match.line_number }}L[/line-number] {% for seg in match.segments %}{{ seg.text | style_as(seg.style) }}{% endfor %}{{ "" | nl }}
{%- endfor -%}
{%- if pad.more_matches_count > 0 -%}
    {{ pad.left_pad }}    [truncation]And {{ pad.more_matches_count }} more results[/truncation]{{ "" | nl }}
{%- endif -%}