Which shells do you guys tend to use the most?

I’ve been trying to get into fish lately, have also used xonsh because I’m really comfortable with python so why not use that instead of bash and just inject subshells into my python scripts

  • invalidusernamelol [he/him]@hexbear.netOP
    link
    fedilink
    English
    arrow-up
    4
    ·
    11 months ago

    It’s so irritating that all these shells aren’t POSIX compliant, and some in really stupid ways.

    There is some utility in them, but for now they’re relegated to the “hey, I’m just gonna use these when I have a very specific small task that they could make a bit easier” or “I wanna spend this week writing bash, but not correctly and kinda buggy”

    Of all of them, Xonsh has the most actual utility since it’s literally just a python repl that lets you assign subshell output directly to python variables.

    def touch_files(x: int, name: str) -> list[str]:
        return [$(touch $n_$name) or f'{n}_{name} for n in range(x)]
    
    @ readmes = touch_files(10, "readme")
    @ ls
    0_readme
    1_readme
    ...
    @ for r in readmes:
        print(r)
    0_readme
    1_readme
    ...
    

    That being said, it’s also a python interpreter and if you install it in the system environment, be ready for your shell to break when your system python changes version. Which is definitely not POSIX compliant lol.

    So yeah, from my adventures in the shell space over the past couple weeks, I can say I agree with you that just sticking with plain old bash is best, followed by dash or zsh if you really just don’t want to use a bash shell. Anything else should be considered an application that runs in your bash shell.