Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And then there's `xonsh`, "The unholy union of bash and Python."[0]

Which I've been using as my daily driver for a few years, and absolutely swear by it.

https://xon.sh



I've been daily driving xonsh for a couple of years too. It _sounds_ like a terrible idea for reasons you can't quite put your finger on, but other than a minor annoyance every now and then, it's been great.

I especially like iterating over files as Path objects with the simple syntax

    for f in p`.\*\.jpg`:
        if f.isdir():
            foo = $(echo @(f.absolute()))


What sorcery is this?! Object oriented bash? Incredible.


PowerShell has entered the chat.


Powershell doesn't simply enter the chat. Powershell enters-its-username-and-password-and-hits-enter the chat.

[I'm usually a fan of informative command names, but surely there's a happy medium]


Really it's just a souped-up Python interactive shell. When you give it bash commands, it forks to bash. When you give it python it evaluates like a REPL


What in the world... that's certainly interesting.


agreed, but if I am learning a new syntax anyways I will go for ansible.


Care to explain? Xonsh is a python shell. From a cursory look at the very corporate Ansible website and wikipedia it's

"an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code"

Whatever that means. They seem to do very different things as far as I can tell.


No new syntax, unless you want to write scripts in xonsh, or mix bash and Python in the same command. There's rarely any reason to. 99/100 times I just write pure bash or pure python




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: