zsh script parser error for nested if/else
<p>I have the following humble zsh function:</p>

<pre><code>function remember()
{
  if [ "$1" != "" ]
  then
    if[ "$1" != "clean" ]
    then
      echo "Why";
      #echo $1 &gt;&gt; {~/.remember_info};
    else
      rm -r ~/.remember_info;
      touch ~/.remember_info;
    fi
  else
    cat .remember_info;
  fi
}
</code></pre>

<p>When I try to source it I get:</p>

<p>parse error near `echo' (The echo being the line with echo "Why";)</p>

<p>The error is quite non descriptive and I assume its related to part of the loop's logic (since no matter what instruction I give after then it error out there).</p>

<p>Is there any way to "debug" this kind of thing ? zsh -n doesn't help much (at all)</p>