title: SQLite3 Terminal Output Formatting .width
body: <p>This is just purely for eye candy while working with SQLite in the terminal, but is there a way to format column width with headers so that each header is resized appropriately (and independently of the other columns)? In other words, here's the output with</p>
  
  <pre><code>.width auto
  </code></pre>
  
  <p>for a simple table</p>
  
  <pre><code>Id          Name        Price     
  ----------  ----------  ----------
  1           Audi        52642     
  2           Mercedes    57127     
  3           Skoda       9000      
  4           Volvo       29000     
  5           Bentley     350000    
  6           Citroen     21000     
  7           Hummer      41400     
  8           Volkswagen  21600 
  </code></pre>
  
  <p>It does what I'd expect. It resizes each column so that the longest item in any one column can be displayed. However, I'd like to automatically have the output formatted such that each column is wide enough for the longest item in <em>only its</em> column. In other words, I don't want to have to type in </p>
  
  <pre><code>.width 2 10 5
  </code></pre>
  
  <p>after the fact to get this output</p>
  
  <pre><code>Id  Name        Price
  --  ----------  -----
  1   Audi        52642
  2   Mercedes    57127
  3   Skoda       9000 
  4   Volvo       29000
  5   Bentley     35000
  6   Citroen     21000
  7   Hummer      41400
  8   Volkswagen  21600
  </code></pre>
  
  <p>Is there something I can do to automate column sizing correctly?</p>