title: Rake: How to accept command-line arguments which include a hypen? (when using the key=value syntax)
body: <p>I have a Rake task which accepts multiple command-line arguments. I prefer to support the key=value syntax for passing parameters to the task, such as:</p>
  
  <pre><code>rake deploy verbose=true environment=production dry-run=true
  </code></pre>
  
  <p>The problem I have is that "dry-run" argument. After running that Rake task, I get the message:</p>
  
  <blockquote>
    <p>Don't know how to build task 'dry-run=true'</p>
  </blockquote>
  
  <p>It doesn't matter if "dry-run" is the first, middle or last argument on the command-line. I could accept the arguments using the "array" style:</p>
  
  <pre><code>rake deploy[true,production,true]
  </code></pre>
  
  <p>But I don't like that, and I could remove the hypen:</p>
  
  <pre><code>rake deploy verbose=true environment=production dryrun=true
  </code></pre>
  
  <p>But I was hoping there was some way of allowing a hyphen in the argument name but I haven't been able to find anything, anywhere that discusses this.</p>