task icon indicating copy to clipboard operation
task copied to clipboard

Text of multi line description not aligned when running `task --list`

Open JakeSummers opened this issue 2 years ago • 0 comments

This feature request is really an exact duplicate of #133 but I don't have permission to reopen the issue

It seems like 10% of my targets are complex and require multiple lines to explain what they do. It would be awesome if multi-line descriptions could be supported.

Current behaviour:

Running task --list, for this file:

version: '3'

tasks:
  long-doc:
    desc: |
      Most tasks don't require a long message but
      10% of targets need a longer message.  It would
      be preferable if the alignment was more crisp.
    cmds:
      - echo 'Other conversations!'

  foo:
    desc: hi
    summary: Using short is best
    cmds:
      - echo "hi"

Results in this:

$ task --list
task: Available tasks for this project:
* foo:            hi
* long-doc:       Most tasks don't require a long message but
10% of targets need a longer message.  It would
be preferable if the alignment was more crisp.

It would be much more readable if it did this:

$ task --list
task: Available tasks for this project:
* foo:            hi
* long-doc:       Most tasks don't require a long message but
                  10% of targets need a longer message.  It would
                  be preferable if the alignment was more crisp.

I know that the summary feature #180 has been added since #133. This is a nice feature but in my view, it plays a different role. :)

JakeSummers avatar Sep 26 '23 01:09 JakeSummers