Skip to content
  • Michal Schmidt's avatar
    unit: print the color status marks on the left · 9ab7a8d2
    Michal Schmidt authored
    The alignment of the "[  OK  ]" and "[FAILED]" status marks to the right
    side of the terminal makes it difficult to link them with the messages
    on the left if your console is wide.
    
    I considered the options:
     1. Align them to the 80th column regardless of the console width.
        Disadvantage - either:
        - truncating messages needlessly, not using available space; or
        - If the message is long, write the mark over it. => ugly
     2. Write them to the 80th column for short messages,
        and further to the right for longer ones.
        Disadvantage:
        - jagged look
     3. Write the marks on the left, before the message.
        Disadvantage:
        - Breaks tradition from RHL.
        Advantages:
        + slightly simpler code
        + Will annoy holy-traditionalists.
    
    I chose option 3.
    BTW, Debian now uses similar marks on the left with its makefile-style
    boot.
    
    Special values of the "status" argument to status_vprintf are:
      NULL - no status mark, no message indentation
      ""   - no status mark, message indented as if the mark was there
    9ab7a8d2