Live data from Hacker News

Xonsh, a Python-ish, Bash-compatible shell language and command prompt

xonsh.org

1–10 of 63 posts

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#7

Forgive me for my lack of knowledge, but where would one use this vs. just using Python?

I think another question is when would one use Python over Bash and vice versa. Personally, I write bash (and shell, reminder bash script not always == shell script) if I need handy command lines. I could have run in subprocess, but would be simpler to just invoke commands directly in my bash script.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#8
This is great. When dealing with bash stupid-isms I've always thought it would be awesome to have a shell with Python syntax. The tough part is figuring out how to combine Python with "normal" shell commands in a clean, intuitive manner but it looks like Xonsh has gone a long way towards solving that!

Just installed on my personal Macbook. Will see how it goes.

Re: Xonsh, a Python-ish, Bash-compatible shell language and command prompt

#9
Is there a way to switch explicitly between Python and Bash mode? The "ls -l" example makes me pretty worried that this could mess up basic bash scripts that already work just by defining a variable like "ls" and forgetting about it, or forgetting where it's defined. It's a great idea, but there's a lot of room for stuff breaking that worries me.
Post reply on HN