title: Can fish shell handle if statements within if statements?
body: <p>I'm trying to get my config.fish to work, but it's not working as expected, and I really can't understand why. The best I can do is guess that maybe Fish can't handle if statements within if statements? Here's my code:</p>
  
  <pre><code>echo "so far so good"
  if status --is-interactive
      # Chips: fish plugin manager
      if [ -e ~/.config/chips/build.fish ] ; . ~/.config/chips/build.fish ; end
  
      echo "def interactive"
      # Don't use vi keybindings in unknown terminals,
      # since weird things can happen.
      set acceptable_terms xterm-256color screen-256color xterm-termite
      echo "acceptable terms: $acceptable_terms"
      echo "term: $TERM"
      if contains $TERM acceptable_terms
          echo "good to go!"
          fish_vi_key_bindings
          # Load pywal colors
          cat ~/.cache/wal/sequences
      else
         echo "why?!?!?"
      end
  end
  </code></pre>
  
  <p>And what I'm getting is this: </p>
  
  <pre><code>so far so good
  def interactive
  acceptable terms: xterm-256color screen-256color xterm-termite
  term: xterm-termite
  why?!?!?
  </code></pre>
  
  <p>But what I expect to see is this: </p>
  
  <pre><code>so far so good
  def interactive
  acceptable terms: xterm-256color screen-256color xterm-termite
  term: xterm-termite
  good to go!
  </code></pre>
  
  <p>But when I run this in a shell, if works fine: </p>
  
  <pre><code>❯ echo "term: $TERM / acceptable: $acceptable_terms"                
  term: xterm-termite / acceptable: xterm-256color screen-256color xterm-termite
  ❯ if contains $TERM $acceptable_terms                               
      echo "yay!"
    end
  yay!
  </code></pre>
  
  <p>What could be going on here? </p>