title: weird bash alias expansion
body: <p>I have a bunch of functions and some aliases. What I never figured out was the problem with these two:</p>
  
  <pre><code>export EDITOR="emacsclient -t"
  alias vi='$EDITOR'
  alias pa='ps ax | egrep -i '
  </code></pre>
  
  <p>when I enter</p>
  
  <pre><code>pa vi
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>egrep: invalid option -- 't'
  </code></pre>
  
  <p>apparently, the "vi" is expanded, when inside another alias, even though it is not in the beginning of the line. Why is this and what can I do about it?</p>
  
  <p>To double check, this:</p>
  
  <pre><code>ps ax | egrep vi
  </code></pre>
  
  <p>performs correctly.
      bash --version
      GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)</p>