Xonsh, a Python-ish, Bash-compatible shell language and command prompt
I'm a lead dev on the fish shell (<a href="http://fishshell.com" rel="nofollow">http://fishshell.com</a>)<p>xonsh looks very cool. Shell scripting languages are famously obtuse and underpowered, and we've thought about how to cleanly merge shell scripting with a real language. It's heartening to see an attempt at it.<p>Ambiguous syntax is a sticking point. For example, say the user runs this:<p><pre><code>    [ 1 ]
</code></pre>
is this constructing a Python list with the value 1, or is it invoking /bin/[ with two arguments? It's ambiguous! It looks like xonsh interprets it the first way. Any thoughts on this issue?<p>A related issue is the relationship between bash functions and Python functions. I'd be very interested to see how xonsh approaches this.<p>Also, here's some unsolicited advise, from one non-POSIX shell maintainer to another: The claim that xonsh is "bash-compatible" is delicate.  Full bash compatibility requires your shell to be insane. E.g.<p><pre><code>   echo foo | cd /
   cd / | echo foo
</code></pre>
In bash, only the second line will change your working directory. Or consider this command:<p><pre><code>   * 
</code></pre>
this finds the first (for some meaning of first) file in your directory and invokes it with all other files as arguments. I tried it: xonsh doesn't handle either of these "correctly," which is to say that xonsh isn't yet insane. That's good news! On the other hand, this means it's not really bash compatible.<p>IME nobody really cares about full bash compatibility. What they want is for their existing bash stuff to just work. Bash shebang scripts will just run in real bash, but that leaves shell-integration scripts: virtualenv, rbenv, etc. Supporting that stuff is one of the most common requests that the fish shell gets, and one of the most commonly cited reasons for not using fish.<p>Here's a piece of rbenv's bash integration: <a href="https://github.com/sstephenson/rbenv/blob/master/libexec/rbenv-hooks" rel="nofollow">https://github.com/sstephenson/rbenv/blob/master/libexec/rbe...</a> . It's short but there's a lot of features being used: set, shopt, IFS, functions, etc. If you're aiming for bash compatibility, that's your target!<p>In the meantime, I suggest changing the language to express that xonsh is bash-like, not bash-compatible. Otherwise users are going to be confused and disappointed.