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

programming

297 readers
1 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

top 9 comments
sorted by: hot top controversial new old
[–] hello_hello@hexbear.net 5 points 6 months ago* (last edited 6 months ago) (1 children)

GNU Bash + GNU Emacs (an interactive shell to a running elisp interpreter)

Since I contribute to NixOS, our builder expressions are in Bash so it helps to be familiar with it. Elisp is always fun to hack on.

I don't really get the shell hype. Especially with Fish since it can't be used as a POSIX compliant login shell. Zsh to me has always been the "apple shell"

Still waiting for the GNU bash release that finally complies with XDG and I can throw that .bashrc out of $HOME

[–] 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.

[–] insurgentrat@hexbear.net 4 points 6 months ago (1 children)

zsh because it's on everything and have some nice settings, powerlevel9k is easy to use and good.

When I write scripts (rare these days) anything critical is in sh.

[–] invalidusernamelol@hexbear.net 2 points 6 months ago (1 children)

Just tried it out and it's cool, but zsh doesn't play well with most ttys when you mess with the prompts like that.

Did lead me down a rabbit hole to oh-my-bash though which is pretty nice and runs on regular bash. Even has a powerbash10k theme lol.

Also found ble.sh which adds syntax highlighting and fish/zsh style atocomplete to a bash shell (written in pure bash). It's slow as turds so I just aliased it to make it easy to enable/disable.

Looks like I'm sticking to bash lol

[–] insurgentrat@hexbear.net 2 points 6 months ago (1 children)
[–] invalidusernamelol@hexbear.net 2 points 6 months ago

Lol, this has all just been a fun weekend diversion. Learned a lot in the process which is really all that matters

[–] Meltyheartlove@hexbear.net 2 points 6 months ago (1 children)

Mostly used bash and sh in the past. zsh for a bit in the middle before going back to bash but now I am on fish shell since almost a year.

[–] invalidusernamelol@hexbear.net 2 points 6 months ago (1 children)

Any major issues besides having to change shebangs from #!/usr/bin/sh to #!/usr/bin/env bash for existing scripts? I'm still not sure I totally get the fish language, it's close enough to bash that I keep wanting to do bash, but different enough that nothing works and I get fun errors lol

[–] Meltyheartlove@hexbear.net 2 points 6 months ago

No clue lol, I haven't written any scripts for fish and lost any previous scripts I had when I switched from arch to cachy which is when I found fish because it was the default.