brianstrauch / spotify-cli

Spotify for the terminal
Apache License 2.0
317 stars 16 forks source link

Stretch tables to width of terminal if needed #32

Closed brianstrauch closed 9 months ago

brianstrauch commented 3 years ago

Strings wrap before row hits the end of the terminal.

brianstrauch commented 3 years ago

In the following example, the terminal window is 100+ characters wide, yet the table only fits about 73 characters.

$ spotify playlist show classical essentials
   #  |             TITLE              |           ARTIST(S)             
------+--------------------------------+---------------------------------
    1 | The Well-Tempered Clavier:     | Johann Sebastian Bach, Lang     
      | Book 1, BWV 846-869: 1.        | Lang                            
      | Prelude in C Major, BWV 846    |                                 
    2 | The Lark Ascending             | Ralph Vaughan Williams, Tasmin  
      |                                | Little, BBC Philharmonic,       
      |                                | Andrew Davis                    
    3 | Handel / Orch. Hale: Keyboard  | George Frideric Handel,         
      | Suite No. 4 in D Minor, HWV    | Alexander Briger, Academy of    
      | 437: III. Sarabande            | St. Martin in the Fields        
    4 | Bagatelle No. 25 in A Minor,   | Ludwig van Beethoven, Lang      
      | "Für Elise", WoO 59            | Lang                            
    5 | Rhapsody On A Theme Of         | Sergei Rachmaninoff, Daniil     
      | Paganini, Op.43: Variation 18. | Trifonov, Philadelphia          
      | Andante cantabile              | Orchestra, Yannick