When running for example git status
as a a duty task the output has too much white space around it. In this case the output ends with three empty lines instead of one.
Strip white space around output to achieve more consistent formatting no matter which command is run.
This is quite easy to do by adding `|trim' in the jinja template. I modified the pretty fomat to:
{% if success %}<green>✓</green>
{% elif nofail %}<yellow>✗</yellow>
{% else %}<red>✗</red>{% endif %}
<bold>{{ title or command }}</bold>
{% if failure %} ({{ code }}){% endif %}
{% if failure and output and not quiet %}\n
{{ (' > ' + command + '\n') if title else '' }}
{{ output|trim|indent(2 * ' ') }}{% endif %}
Maybe you want to do this as default?
🍰 Thanks a lot for making duty! I discovered it today like it more than other command runners I looked at (make, task, just, invoke).
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too