this post was submitted on 10 Aug 2025
8 points (100.0% liked)

programming

297 readers
4 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] invalidusernamelol@hexbear.net 4 points 6 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.