title: Powershell: can stdout be redirected to a PowerShell function?
body: <p>I use vim and want to use it to mimic <a href="http://en.wikipedia.org/wiki/Less_%28Unix%29" rel="nofollow">less</a> in Powershell. So I want to write a PowerShell function to wrap it. </p>
  
  <p>Vim has a <a href="http://vimdoc.sourceforge.net/htmldoc/various.html#less" rel="nofollow">less mode</a>. To use it I just need to issue a command like this:</p>
  
  <pre><code>type somefile.txt | vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' -
  </code></pre>
  
  <p>However PowerShell function doesn't seem to have a way to let me <em>take</em> stdout from the pipe. Any hint?</p>