blangel / wrk

A command line interface to Trello
177 stars 18 forks source link

Four leading spaces before descriptions? #9

Open kennethgillen opened 8 years ago

kennethgillen commented 8 years ago

Hi,

Using wrk version 1.0.1, there appears to be four leading spaces printed in front of a card description when using wrk desc

Since these spaces are not actually in the card description it's frustrating to have them included when running e.g. wrk desc - see the 'last name' example below:


HOSTNAME:~ kenny$ wrk desc c:134561234132412341
 Description of card 134561234132412341:
   card-title | 134561234132412341
     first name: 'forename'
 last name: 'surname'
 institution: 'some-institution'
 email: 'some-email@address.com'
     https://trello.com/c/aFaFaFaF/card-title-here

I wonder if it's the following lines:

i.e. git grep for "four spaces, then a %s":


 HOSTNAME:wrk kenny$ git grep -i "    %s" *
 src/main/java/net/ocheyedan/wrk/cmd/trello/Desc.java:                    Output.print("    %s", desc);
 src/main/java/net/ocheyedan/wrk/cmd/trello/Desc.java:                    Output.print("    %s", desc);
 src/main/java/net/ocheyedan/wrk/cmd/trello/Desc.java:                    Output.print("    %s", desc);
blangel commented 8 years ago

@kennethgillen right. The spaces are for indentation but this fails when the description itself has newlines within it. Your output (as I intended) should have been:

Description of card 134561234132412341:
  card-title | 134561234132412341
    first name: 'forename'
    last name: 'surname'
    institution: 'some-institution'
    email: 'some-email@address.com'
    https://trello.com/c/aFaFaFaF/card-title-here

Would this suffice? Alternatively, I could simply not indent everything:

Description of card 134561234132412341:
card-title | 134561234132412341
first name: 'forename'
last name: 'surname'
institution: 'some-institution'
email: 'some-email@address.com'
https://trello.com/c/aFaFaFaF/card-title-here
kennethgillen commented 8 years ago

Hi @blangel.

I think the former, i.e.

Description of card 134561234132412341:
  card-title | 134561234132412341
    first name: 'forename'
    last name: 'surname'
    institution: 'some-institution'
    email: 'some-email@address.com'
    https://trello.com/c/aFaFaFaF/card-title-here

Is lovely, and looks great. Consistency looks good. Thanks for noticing the issue.