Which shell do you use?

I am just curious what y’all like to use. I tried Fish for a little bit, but I went back to Bash.

I have some bash configs that make it really nice for me.

The new line is the most important part, for me.

1 Like

I use Fish when I get antsy and I wanna try something new. Otherwise I use bash.

I like for my tools to be portable, available across lots of OSes and architectures and have the vendors be nonprofits I trust. I like some more historic unix shells in principle but MAN … bash is just … so much more feature-full. You dont get bash by default on BSDs but it’s always in their ports trees too.

I occasionally use powershell entirely for work purposes but my job related powershell duties are rapidly being sunset. I also often have Nostalgia for DOS’s command.com/cmd.exe and have cranked out a batchfile or two for my employer before as well.

When I script I try to avoid bashisms though just in case I end up on a non bash environment.

2 Likes

I’m bash, by “default choice”. That is to say, it’s got the lion’s share of linux distros as the default, but when I tried others I didn’t like them as much.

That said, I don’t do anything with my shell. I too like portable tech in theory, but as I don’t actually do anything with it, script-wise, it is a background tech for me.

Shell prompts, on the other hand!

Why is that? It looks like a mud prompt, which I love. Newline and all.

[maiki@yuzu ~]$

I had a git-specific prompt on the last distro, but haven’t brought it up since, so I suppose I don’t use git as often these days, either… :thinking:

Off the top of your head, what are two or three bashisms to look out for? I am aware of this, while never knowing if I use them or not.

1 Like

I like commands always being in the same place, character wise and not having to alter my visual scan of a thing because i’m 5 directories in vs 1. Like i’ll run a long command, then realize i need to make a tweak, hit up and my eyes don’t have to move really, they are focused on the spot i needed to change from before.

1 Like

Bash supports some streamlined syntax for loops that don’t work in standard shell. This is where bashisms most often can creep in for me personally.

Bash provides a lot of tiny quality of life improvements and useful canned environmental variables which don’t exist in posix but are convenient. Like $RANDOM.

And while not exactly a bashism having a shebang point to bash often assumes bash’s availability and is a good way to have a script fail out of the box on BSDs. Bash comes from the ports tree not the system on BSDs, so it’s often in /usr/local/bin or /usr/pkgsrc/bin. If you want to use bash in a script and you want portability to BSD best to use: #!/usr/bin/env bash as your shebang.

Debian has a package called devscripts which has a utility called checkbashisms which will check if your using any. Not sure what its packaged as in Fedora.

1 Like

bash here! i used to have more custom scripts but keep losing them. i know i should back up my dotfiles.

i also really like having a newline. i also need to have some git functionality, like saying what branch i’m on, colorizing if there are unstaged changes, and branch name completion.

once years ago someone at work downloaded a script that turned your automated test suite output into an animated nyancat in ascii art. it even played the song. it was so amazing.

1 Like

I used to have git feedback, bit didn’t set it up on migration and didn’t notice. I think I really just want a single emblem to indicate I’m in a git repo.

Oh, let’s share scripts here! @tim, what’s yer config? The reason I dropped my git feedback is it dominated my bash config, something like 90 lines. Maybe there’s a better way…

I don’t have many configs to speak up, hence I haven’t reshared my config repo on atc.

1 Like

When on Linux, it’s either bash or zsh, when on *BSD, either it’s bash when on not on OpenBSD, and when on OpenBSD I use ksh.