title: Split by space preserving string inside curly braces
body: <pre><code>str = "cmd -opt1 { a b c  d e f g h } -opt2" 
  </code></pre>
  
  <p>I want output like this:  </p>
  
  <pre><code>[ 'cmd', '-opt1', '{ a b c  d e f g h }', '-opt2' ]  
  </code></pre>