padz 0.10.1

A fast, project-aware scratch pad for the command line
1
2
3
4
5
6
7
8
9
10
11
12
13
{#- Peek content preview for a pad -#}
{#- Expects: pad.left_pad, pad.peek (PeekResult with opening_lines, truncated_count, closing_lines) -#}
{{- "" | nl -}}
{{- "    " }}{{ pad.left_pad }}    {{ pad.peek.opening_lines | style("preview") | indent(8) | nl -}}
{%- if pad.peek.truncated_count -%}
{{- "" | nl -}}
{{- "    " }}{{ pad.left_pad }}                      {{ ("... " ~ pad.peek.truncated_count ~ " lines not shown ...") | style("truncation") | nl -}}
{{- "" | nl -}}
{%- endif -%}
{%- if pad.peek.closing_lines -%}
{{- "    " }}{{ pad.left_pad }}    {{ pad.peek.closing_lines | style("preview") | indent(8) | nl -}}
{%- endif -%}
{{- "" | nl -}}