You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
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.
Describe the solution you'd like
Strip white space around output to achieve more consistent formatting no matter which command is run.
Additional context
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).
Boost priority
Boost priority in our backlog through Polar.sh. Higher pledge, higher priority.
Minimum pledge by user/organization is $5, minimum amount for boost is $30.
Thanks for the request and the kind words! Super happy you like duty ^^
The request sounds reasonable. However I'm generally very hesitant with changing output arbitrarily. For all I know, someone wants to keep all the spacing 🤔
But I agree that most of the time there's no point in keeping trailing empty lines. Let me think about it more. Whether we do this by default or not, we can at least have a toggle to enable/disable trimming ^^
Is your feature request related to a problem? Please describe.
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.Describe the solution you'd like
Strip white space around output to achieve more consistent formatting no matter which command is run.
Additional context
This is quite easy to do by adding `|trim' in the jinja template. I modified the pretty fomat to:
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).
Boost priority
The text was updated successfully, but these errors were encountered: