title: docker-compose exec failed: executable file not found in $PATH
body: <p>I want to get an interactive prompt with <code>docker-compose exec [service_name] [shell]</code> and to fallback on another shell if the first does not exist. </p>
  
  <p>I tried to run the following command:</p>
  
  <p><code>docker-compose exec [service_name] "(which zsh &amp;&amp; zsh) || (which bash &amp;&amp; bash) || (which sh &amp;&amp; sh)"</code></p>
  
  <p>but I got this error:</p>
  
  <p><code>rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"\\\"(which zsh &amp;&amp; zsh) || (which bash &amp;&amp; bash) || (which sh &amp;&amp; sh)\\\"\": executable file not found in $PATH"</code></p>
  
  <p>If I run </p>
  
  <p><code>docker-compose exec [service_name] bash</code> (zsh/bash/sh)</p>
  
  <p>it opens a bash prompt and then inside the container I run</p>
  
  <p><code>(which zsh &amp;&amp; zsh) || (which bash &amp;&amp; bash) || (which sh &amp;&amp; sh)</code></p>
  
  <p>and it works fine, it changes the shell to zsh.</p>