rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.12k stars 553 forks source link

Indent multiline messages in say_status #714

Closed jonathanhefner closed 3 years ago

jonathanhefner commented 4 years ago

This prevents multiline status messages from breaking the left margin.

As an example, before this commit:

     status1  single line
     status2  multiline line 1
multiline line 2
multiline line 3
     status3  multiline indent 0
  multiline indent 2
    multiline indent 4
     status4  single line

And after this commit:

     status1  single line
     status2  multiline line 1
              multiline line 2
              multiline line 3
     status3  multiline indent 0
                multiline indent 2
                  multiline indent 4
     status4  single line

Closes rails/rails#38387.

alexpapworth commented 4 years ago

@rafaelfranca any chance we can merge this one?

dorner commented 3 years ago

I like this change but it might be breaking behavior since existing usage may be compensating for this by adding more spaces. @rafaelfranca is this something we should leave for a major version bump? Or add a flag for this behavior as an argument?