title: Using a pipe within a bash alias
body: <p>I don't have experience in shell scripting, so I'm unable to see the problem of the following situation:</p>
  
  <p>I have defined an alias of the following form(<code>file.c</code> is located in <code>~/dir</code>):</p>
  
  <pre><code>alias code="cd ~/dir | vim file.c"
  </code></pre>
  
  <p>When inputting it, I get the following warning, and the proper files aren't opened:</p>
  
  <pre><code>Vim: Warning: Input is not from a terminal
  2 files to edit
  </code></pre>
  
  <p>I thought that the pipe operator in this instance would separate the two commands, first changing the directory, then opening the file.</p>