title: Unix: (pwd now: ~) from cd command?
body: <p>Me being me, I went playing around with the terminal (zsh.) One of the things I tried (in an empty directory) was <code>mkdir test; ls | cd</code> This <em>should</em> make a folder then print all folders (so just that one) and pipe the output to cd. So I expected it to take me to the test directory but instead I got <code>(pwd now: ~)</code> and it took me back to the home directory. Does anyone know why this is? Looking it up gives nothing useful.</p>
  <p>EDIT: It takes me to the ~ directory because cd doesn't accept stdin inputs, but rather the directory is an argument. What I still want to know is why running <code>ls | cd</code> gives the output <code>(pwd now: ~)</code> instead of just nothing. Running <code>echo test | cd</code> gives no output but <code>ls | cd</code> does.</p>