title: Implement the subcommand pattern in PowerShell
body: <p>Is it possible to implement the subcommand pattern in PowerShell?  Something like:</p>
  
  <pre><code>command [subcommand] [options] [files]
  </code></pre>
  
  <p>Examples: Git, svn, Homebrew</p>
  
  <p>What would be the general architecture?  A single function that delegates the actual work to script blocks?  Each subcommand isolated in its own <code>PS1</code> file that is dot-sources by the primary script?  Would PowerShell's various meta-data functions (e.g. <code>Get-Command</code>) be able to 'inspect' the subcommands?</p>