title: Passing a bash variable to git formatter
body: <p>I want to pass an integer saved in a bash variable to <code>git show --format</code>, how can I do this?<br>
  When I pass the variable the git formatter treats it like a literal and doesn't retrieve its value, instead printing out the name of the variable.<br>
  I've written a script that does some processing but for brevity I will paste the relevant part of the script:</p>
  
  <pre><code>git show -s --format='%C(yellow)commit %H%C(reset) %C(magenta bold)(commit message lines: $lines)%C(reset)%n%B' $i
  </code></pre>
  
  <p>Currently, it outputs something like:  </p>
  
  <pre><code>commit 6fc73ae81627edf220d3005eafbdd3d7f5f898d7 (commit message lines: $lines)
  Fix foo
  
  Fixing foo consisted of:
  - Fixing bar
  - Fixing baz
  </code></pre>
  
  <p>What I want it to output is instead:  </p>
  
  <pre><code>commit 6fc73ae81627edf220d3005eafbdd3d7f5f898d7 (commit message lines: 5)
  Fix foo
  
  Fixing foo consisted of:
  - Fixing bar
  - Fixing baz
  </code></pre>