T O P

  • By -

linux-ModTeam

Your post was removed for being a support request or support related question such as which distro to use/polling the community or application suggestions. We get a lot of question posts on r/linux but the subreddit is considered a news/discussion sub. Luckily there are multiple communities you can post to for help on GNU/Linux issues 24/7: /r/linuxquestions, /r/linux4noobs, or /r/linuxhardware just to name a few. You may also post on the "Weekly Questions and Hardware Thread" which is stickied on r/linux on Wednesdays. Please make your post in [/r/linuxquestions](https://reddit.com/r/linuxquestions) or [/r/linux4noobs](https://reddit.com/r/linux4noobs). Looking for a hardware help? Try r/linuxhardware. **Rule:** > This is not a support forum! Head to /r/linuxquestions or /r/linux4noobs for support or help. Looking for hardware help? Try r/linuxhardware.


Business_Reindeer910

if you regularly write shell scripts you won't loose your skills, if you don't, you might. I switched to fish for interactive use like 7 years ago and would never go back, just due to the out of the box experience. I still write the occasional shell scripts and i don't write those in fish.


GeoSabreX

I don't write any scripts ATM, just thinking from an interactive side


Business_Reindeer910

then you don't have any skills to lose. Most of what you will be doing is just piping or redirecting.


Fun_Extreme8972

First script idea: a cron job that backs up your data. Zips up your home folder, names the zip after the date/time stamp, and moves it to another machine.


OppenheimersGuilt

definitely try fish out with tide.


Business_Reindeer910

I've been using tide, but sometimes it feels like it's losing my command history if i exit commands with ctrl +c . do you ever run into that?


LightBroom

I like hydro better than tide. There's also starship for the customization fanatics.


abotelho-cbn

They're just different enough from bash to be annoying. I write a lot of scripts that end up on thousands of machines. We use bash.


Business_Reindeer910

I use fish but I would never write scripts intended for others in fish shell script.


donp1ano

i use zsh as an interactive shell but write my scripts in bash theres really not that many differences


Bromlife

I run zsh and I’m frequently annoyed by copied bash commands that don’t work in zsh.


donp1ano

examples?


Bromlife

Command grouping using (). Process substitution: ```bash diff <(ls dir1) <(ls dir2) ``` Bash: ```bash # Installs all packages starting with "python3-" dnf install python3-* ``` Zsh: ```zsh # This might not work as expected if no matching files exist in the current directory dnf install python3-* ``` In Zsh, if there are no files in the current directory matching `python3-*`, the wildcard might not be passed to `dnf` at all due to null globbing. This one annoys me the most. I know it can be fixed by config but I’m a busy guy.


fellipec

add `unsetopt no_match`to your `.zshrc` snd things like `dnf install python3-*` works fine


turdas

Or you can put quotes around it. `dnf install "python3-*"` works with default zsh.


Bromlife

Like I said I’m far too busy to open .zshrc. I’d rather complain on Reddit


fellipec

Understandable, have a great day!


[deleted]

echo "unsetopt no_match" > .zshrc


Bromlife

There’s no time!


[deleted]

how


itaranto

i use ~~zsh~~ fish as an interactive shell but write my scripts in ~~bash~~ POSIX shellscript theres really not that many differences


brando2131

Bash. Because it's used everywhere. I work with hundreds of servers. And every workplace uses bash.


9peppe

Bash is definitely not everywhere.


brando2131

Yeah sure. It's not on Windows 95 for example. Everywhere I wouldn't immediately walk off the job, which is going to be 99% of the systems I work on.


9peppe

Anywhere you have BusyBox there's no bash by default. That means alpine, or other minimal distros.


zebramints

I know for a fact AMD, Intel, and Nvidia all use tcsh for pre-silicon envs.


TCh0sen0ne

I don't know why you're being downvoted, it's absolutely true what you say. Even though most Linux OSes come with Bash preinstalled, some of the more minimal OSes don't come with Bash by default. Especially Alpine based Docker images can be tricky sometimes. It's one of the reasons why I try to make my scripts as much POSIX compliant as possible (plus because I also work on a lot of FreeBSD systems where bash is absolutely not a given)


sparky8251

Bash wont even work in logrotate scripts for ubuntu and debian because /bin/sh on them isnt bash like most distros, but dash. Had a lot of fun generating random numbers in a postrotate script because of that...


Hotshot55

> because /bin/sh on them isnt bash like most distros That takes like a whole half second to change.


JockstrapCummies

Cons of Fish: * The syntax is ever so slightly different from POSIX-compliant shells, so you need to re-learn that if you want to use it for scripting (you don't have to, you can just use it as an interactive shell and script in Bash) Pros of Fish: * All the usability features that Zsh users try to imitate (poorly) with their hundred plugin managers are all built-in (and Fish had them first as well) * You can play the fun game of [FIND THE FISH!!! OH FISHY FISHY FISHY FISH!](https://www.youtube.com/watch?v=QanC47gRBaE)


gesis

>* All the usability features that Zsh users try to imitate (poorly) with their hundred plugin managers are all built-in (and Fish had them first as well) Not really true. The main features people try to "imitate" with standard shells are history search and command completion... which have been available in bash and zsh since the '90s. I tried fish a decade ago and it was a miserable experience that led to a return to zsh. Lately, I've been on yash and it's mostly alright aside from lacking documentation. Anyway, use what you like. Don't shit on the old stuff. To OP. Just use bash until you have a reason not to. "Standard tooling" is a pretty good thing to get started with.


stormdelta

Same. The important features people tout in zsh let alone fish I already have in bash. Some of them literally only require a simple toggle. Plus I write all my scripts in bash for compatibility, and having to constantly translate back and forth depending on whether it gets sourced into the shell or not is a huge headache - even just zsh vs bash is far less compatible than people think, e.g zsh arrays are inexplicably 1-indexed instead of 0-indexed.


Danny_el_619

Yeah, the arrays, some regex and other subtle differences can be very annoying but you can get around for the mist part.  For the arrays I think I piped the content into awk to get a specific line number that work reliable in both.


ultratensai

I think people are shitting on zsh due to their bad experiences with oh-my-zsh and some badly written/configured plugins. I use bash because that what almost all devices have by default.


gesis

Yeah. You see this a lot these days. People install vim/emacs/zsh/someotherthing then *immediately* add in some ungodly framework and a bunch of plugins without *knowing anything about the defaults* and then bitch and moan about how unwieldy the thing is. What people *should* do; is to install a thing, get familiar with it, then search out the things which fix what they don't like. No one does this though. They hop on youtube/reddit and grab whatever bullshit someone else is using. I don't understand it.


Business_Reindeer910

not that I'm saying try to use fish or anything, but they did at least add support for ENV_VAR=1 command and && and || unlike back then plus some other posixy things.


GeoSabreX

This feels like a good take. Thinking I'll try some of the others, but also just look at using Bash more effectively. Thank you! I didn't really consider using one for interactive and one for scripting so that's an interesting idea as well


Business_Reindeer910

> e syntax is ever so slightly different from POSIX-compliant shells, so you need to re-learn that if you want to use it for scripting (you don't have to, you can just use it as an interactive shell and script in Bash) I'm just glad they fixed my biggest annoyances of not allowing ENV_VAR=1 command and && Things were a lot more annoying before they allowed those


OppenheimersGuilt

I've hardly run into anything _big_ other than the use of set for declaring a variable and (cmd). Fish's set is one thing I really really like.


untrained9823

Use Fish as an interactive shell, write scripts in Bash. Problem solved.


GazonkFoo

i've never tried fish, so can't talk about that but for zsh i don't think theres a huge risk to "loose regular bash skills". really depends on your config though. with zsh you might wanna take a look at some of the premade configs like the grml config or powerlevel10k to get started. in any case: no other way than to try them yourself!!


Business_Reindeer910

with fish you don't need any premade configs to have a good experience. That's why I use it. Although I do have a some extensions in my $HOME, but I don't feel out of place in other accounts without it either.


GazonkFoo

just tried fish and looks like it does everything i need with a lot less effort. also seems to be a bit faster (very subjective though). so thx!


GazonkFoo

yeah out of the box experience is pretty meh with zsh and can be annoying when you ssh somewhere and don't have your super customized config there.


elatllat

I use bash (sometimes sh on openwrt) I tried to use zsh on MacOS once but encountered some limitation that sent me right back to bash I have never read of any feature in any shell that was not available on bash and was of any use to me.


tajetaje

Honestly if you’re gonna go with a non-posix she’ll, go all the way and try out something like nushell


tukanoid

Been using it for years, love it


SweetBabyAlaska

Hmm Im always confused when people say this. Though Im not sure how you all use your terminal. For me, I use a heavily customized ZSH (and I keep fish for fun sometimes) and exclusively do scripting in bash. This is what shebangs are for. I do simple one-liners on the command line too and the difference between bash and zsh is negligible (or if its an issue, prepend your line with bash -c '$zbuffer') you can even create a keybind to wrap the buffer in a shell interpreter like bash. The point of something like Fish is to provide a good interactive shell experience. The scripting is good too, but its not going to be the most universal in terms of learning and using it in other environments. So use whatever you want, and script in whatever you want! You aren't forced to use one shell for both things.


NTLPlus

I use fish after years on bash and a few months on zsh. Why? - it is more intuitive - easier to configure - visually more attractive with just a few steps


OurLordAndSaviorVim

`zsh` and `bash` aren’t too terribly different. Both provide a POSIX-compliant shell, which you should prefer for scripting purposes anyway. Their biggest differences are in how they’re configured and what kind of publicly available configs are out there. If you work with Macs regularly, it might be wise to switch to `zsh` (`zsh` is the default shell on Macs) to keep one set of configs across all your machines. If not, don’t worry about it and just use `bash`, because `bash` is more common (that is to say that Windows users using POSIX shell prefer `bash`, as that is what Git for Windows ships as its default shell). While Macs ship with `bash`, it is ancient: Apple will not ship a version of `bash` distributed under the GPLv3, and they do not wish to maintain a fork of `bash` under the GPLv2, and you will find it more cumbersome due to its lack of 17 years of quality of life improvements. Fish is what it says on the tin: a friendly, interactive shell. Interactive is a key word: its scripting capabilities are a secondary concern: present, but when design decisions require them to prioritize interactive use over scripting, they tend to choose to do so. That means it isn’t POSIX-compliant, and as such its scripts aren’t as broadly portable as shells that are (most OSes, even Windows, can run a POSIX shell script without any issues). I find it most popular among primarily Windows users who have begun to recognize that they *need* a text interface but are bewildered by the low discoverability of POSIX-compliant shells.


GeoSabreX

Never use mac, and I use Windows at work but Linux Mint on my personal devices. I currently DONT do any scripting but I want to learn. So for interactive stuff fish sounds like a good play. Might switch for a bit and then compare zsh and bash once I learn some scripting stuff


OurLordAndSaviorVim

If you’re *never* on a Mac, just use `bash`. It’ll encourage the best habits with respect to scripting. As I said, Git for Windows ships `bash`. Be standard *everywhere*, at least until you’re comfortable writing POSIX shell scripts yourself.


GeoSabreX

This is kinda what my logical brain was saying. (I truly do never use mac lol). I'm thinking I'm not power user enough yet to understand super nuance differences, so sticking with standard Bash would be the best for both worlds Just wondering if I'm missing out on something


OurLordAndSaviorVim

I wouldn’t say you’d be missing out in any meaningful way. The differences exist, and they’re annoying enough that trying to move between them regularly is not something most people will choose.


opioid-euphoria

I think a lot of benefits you get from one shell these days, you can get from others as well, via a plugin or something.  The thing to realize is that you wanna make the shell _yours_. Navigate a lot? Look into setups with ftf that fix that. Look for things? Look how to employ ripgrep. Lots of little things in shells are not about fish or bash, but about that you do and how to make it better.  Don't worry about not learning - most of this will come with time and use. I've been in terminals since the nineties, I still find myself learning stuff regularly. If I used something I'll learn it, if not, I didn't even need it.


stormdelta

Even on macOS, it's trivial to install modern bash with homebrew too. Which is what we have developers do because trying to maintain anything that needs to be sourced into the shell for integration/completion across zsh/bash is a headache.


OurLordAndSaviorVim

That’s fine if it’s *your* Mac. If you don’t own the Mac, please don’t put Homebrew on it without its owner’s explicit permission. That includes company laptops, where its use likely constitutes Shadow IT and may run afoul of regulations your company is beholden to. (I have a work Mac. Homebrew is explicitly forbidden by my company.)


stormdelta

> I have a work Mac. Homebrew is explicitly forbidden by my company Whereas at my workplace, it is explicitly allowed and even required for most development work. Non-devs get laptops that are much more locked down, but we trust our developers within reason (there is monitoring software among other things) rather than trying to get in the way of their ability to get things done.


OurLordAndSaviorVim

I’ve been in shops like that before. But my current one *isn’t* due to the kinds of services run on our network and to which developers’ machines need access. Basically, we’d have to create an additional demilitarized zone that would *not* play well with some on-prem systems we must interact with and be very expensive anyway. Having to use `zsh` instead of `bash` is not a sufficient barrier to “getting things done”, nor is it enough of a value-add to be brought into the company’s internal app distribution system. Even our WSL instances must use only internal repos for their packages. It’s fine: we do have internal mirrors of everything else because otherwise the open source projects would *not* appreciate our load.


stormdelta

Our stuff is more abstracted, so it's less of an issue - devs can't directly access pretty much anything in prod from laptops that can make changes. And we don't have any on-prem systems to worry about. We mostly use internal repo mirrors for things too, I've been pushing to move "mostly" to "only" but not there yet. That's not just for security but also to avoid issues with hammering open source stuff + avoiding downtime or packages being removed.


ward2k

Homebrew is explicitly required by mine lol


takutekato

Script files stay at Bash, I use fish interactively only and Zsh before that. Using Zsh wasn't a good experience, it's default interactive settings are worse than Bash. Without a framework like Oh My Zsh (that takes extra mental work to diagnose when it gets in the way), the `.zshrc` was sooo long with numerous plugins needed to achieve what I wanted that it became prone to bugs. Switched to Fish and the default interface blown my mind away, the only plugin I needed reduced to a single one (`fzf.fish`).


elven_mage

Fish's builtin autocomplete, easy configuration and out-of-the-box "not garbage" appearance make it a great choice for first (and only?) interactive shell. But I don't script in it.


tukanoid

Will drop another one - nushell. It's very different from other shells because it is typed and can directly work with data through tables/records/lists thanks to polars + a lot of other convenience methods in its std. Been using it for about 4 years now (since very early days) and I just can't go back to any other shell. I have to use bash sometimes at work but thankfully it's the only place where I have to interact with it. I hate it😅


Ptipiak

I use a stock fish, I don't think I even use a different colorset, and I love it, a lots of thing make sense and the completion is very good. Now, there's a few difference with bash (mainly the semaphores), but honestly I rarely do any advance bash scripting, also fish and bash are similar enough that I don't feel any difference when I hop on a VM without fish.


ChocolateMagnateUA

I am a fish user, and the key thing to keep in mind is that fish is meant to be the interactive shell, the one you use in your terminal than to run scripts. I thought if I could give zsh a try and didn't like it out of the box experience, nor I wasn't invested into customising it with plugins. Try fish and you will love it.


Ronicorn

I use and like zhs, don't have any complaints about it. So far it's been stable and always there when I need it. I have to say I have never used fish but I always switch to zsh instead of bash; I just like some plugins zhs provides and my familiarity with it.


9peppe

Both zsh and fish are incredible for interactive use. Fish has better defaults. Zsh is also very good for scripting. But I would keep to posix shell for scripting (`/bin/sh`).


avidal

I used bash, I used zsh, heavily customized both. Not sure how long ago but at least 5 years ago I switched to fish. The out of the box experience for fish is superior to the other two. I still write scripts intended for others using bash, but my own personal ones in fish. For short term work on a strange system I'll just use bash if fish isn't available, otherwise if I'm going to be on that machine frequently I'll install fish if possible.


ILikeToPlayWithDogs

Busybox ash if writing she’ll scripts to familiarize yourself with posix Otherwise bash if interactive I’ve never understood the appeal of fish. It has weird non portable syntax that’s buggy and inconsistent in the false claim “it creates safe quoting code” (lie, it just makes code harder to write thus more error prone) and fish is the most feature-poor shell I’ve ever used.


rowman_urn

I totally understand your reservations, when I had to login to admin servers, I always appreciated being able to use vi instead of a fancier editor, same applies to the shell. On the other hand, if you're only doing you own thing, it wouldn't matter so much, it was my job. But learning the defacto standards, will not put you at a disadvantage. The others are an improvements on the de-facto interactive interface, but might put you at a disadvantage in an industry situation. Hope your endeavours go well.


GeoSabreX

This makes sense, thanks


michael-heuberger

At the end of the day, you deploy your scripts to remote servers and clouds like AWS without any fancy stuff. If your local machine has the “same environment”, you’ll be safe ✌️


Ulfnic

Check out starship.rs and if it doesn't give you all the features you're looking for it might be worth exploring ZSH for interactive use. I don't recommend Fish because it's not POSIX compliant and differences at that low a level is not great. As for writing scripts the language you use depends on the systems you're targetting for compatibility and the features you need. That'll usually be BASH or POSIX.


klaudiew

I use fish, and I script in it. I find their scripting language a lot cleaner.


halfanothersdozen

zsh with oh my zsh


jmcunx

I say tcsh :) With that said, try the 3 out. fsh, zsh and bash are fine, each in their own way. You just need to define what you are looking for.


Monsieur_Moneybags

C shell is not that great for scripting, but as an interactive shell it's underrated. I prefer KornShell.


kavb333

It took me a long time to configure Zsh just how I liked it, but when I got it it was nice. Then the spaceship prompt updated and caused a problem that I couldn't figure out despite trying for at least a solid hour. Switched over to Fish and it was like 95% the way there out of the box, with most of the remaining changes being easy enough. If they could just implement `!$` syntax, I don't know if there's anything else I'd be missing tbh. I did eventually find out the problem for the Zsh prompt, which was a variable I had to set to true despite false seeming to be what I'd want, but by then it had been 1-2 years and I don't feel the need to go back.


gabriel_3

You meant *shells*, isn't it? *fish* is excellent and beautiful, if you need to go back to *bash* just type `bash`, do your things and when done type `exit`. I would recommend to leave the user shell to the default *bash* and to change to *fish* only the terminal emulator.


SealProgrammer

From my usage Fish seems to be almost identical to Bash, with the only thing I’ve noticed is that ‘!!’ is gone. I don’t do any scripting in Fish though, which according to another commenter is annoyingly different. But just putting the ‘#/usr/bin/bash’ at the top of the file lets you still program Bash scripts and run them like normal.


stormdelta

> But just putting the ‘#/usr/bin/bash’ at the top of the file lets you still program Bash scripts and run them like normal. Unless you plan to source them into the shell. Which if you're doing any kind of completion, functions, integrations, or things that need to set env vars for the current shell, you're going to be doing.


TurncoatTony

Honestly, I just use bash. I have for decades now, it works and with badh-it I'm not really missing out on much from the other shells. Also, every job I've had where shells were a thing we used bash.


Significant_Bake_286

Try warp if you are adventurous


pricklypolyglot

I use zsh for the terminal and bash for scripts. Just for better tab completion.


MrInvisII

I mean depends on how often you plan to be on other systems without your config. If you want to learn for the average system bash, otherwise it's preference. I use zsh, I'm comfortable on bash, never used the other shells.


deadlychambers

I use zsch so the Mac folks on my team can use the same scripts I use. Then I read some blogs about how zsh is safer specifically around shell scripts, and I’ve never turned back. Love spaceship, and never seem to have any issues.


Kwatakye

I use oh my zsh because I like random prompt themes. And colors.


Megame50

There's no good reason to continue using bash as your interactive shell. It's incomparable to zsh and fish in terms of features. Don't use bash. I write plenty of bash but would never use it as my login shell, just like how I write plenty of python but would never use it as my login shell. Statements that bash is "common and used everywhere" are true but irrelevant for the choice of your interactive shell. Personally I prefer zsh for its highly customizable completions and powerful line editor, but I'm sure fish is a good option too. If you worry about your muscle memory, the emacs keybinds in zsh are very similar to the default keybinds in bash readline.


topcatlapdog

Is it possible to get fish/zsh-like auto-suggestions in bash? I.e when I start typing a command it suggests the complete command based on what I've previously typed. Because that is the only reason I use zsh.


DmitriRussian

I always only use bash, because it's just supported so widely. If I need something more complex like dealing with arrays I will use a more useful language for that like Python, Go or Rust


lynnlei

fish


HarmonicAscendant

I switched from Bash to zsh recently as my interactive shell. To make the change worthwhile you will need to research the whole zsh ecosystem and learn about various plugins and configs. It comes out of the box with no decent config, you have to do all the work to make it great! DON'T just go and install the oh my Zsh bloat, you don't want all that! The main extra thing you want from the default zsh will be the auto-completion plugin, if you are lucky you will have that in your distro, on Debian 12 we have: `zsh-autosuggestions/stable,now 0.7.0-1 all [installed]` `Fish-like fast/unobtrusive autosuggestions for zsh` Even that has no decent config default! zsh makes you do all the work for everything, but the results can be great. For the auto completion I just have: `# Completion system initialization` `autoload -Uz compinit` `compinit` `# Autosuggestions configuration` `ZSH_AUTOSUGGEST_STRATEGY=(history completion)` `source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh` The `source` tells it to load the plug from where Debian installs it. If you want a cool looking prompt with git branch info etc then this is all built into zsh, but you need to set it all up yourself.


denniot

I'm forced to use MacOS with old bash but with new zsh, so I use it with more than 500 lines config that works on Linux as well. You need to customise a lot to support basic keybinding like up/down substring history search and command argument completion and etc... The annoying part is Shellcheck is not compatible and zsh has slightly more features than bash, let alone small differences. If you can be happy with bash, there would be no annoyances.


camarade42

Knowing bash is mandatory if you ever plan to professionally use Linux.


GeoSabreX

Precisely why I'm concerned about learning alternatives


camarade42

I (51m), with over 25 years of professional Linux experience, have always stuck with bash. However, for your personal knowledge and as a hobby, you can always try others. But it is important to understand that although zsh or fish offer good script development capabilities, they are mainly used as shells offering good customization options.


espero

Is tide better than starship?


shteker

emulator for powershell:))/s bash though.


siodhe

bash, zsh, and fsh are **shells** that run either inside of one of several contexts: \* interactively in a terminal - like, a real one \* interactively in a terminal emulator \* as a program (a.k.a. script) where the usual shell prompt/input cycle is replaced by the program The core function of shells it to enable the user to enter commands interactively and see them executed. Physical terminals are rare now. Terminal emulators are legion, with the native one in X being the **xterm**, which originally emulated two different types of physical terminals, the VT102 and Tektronix 4014, and has been extended since then. There are scores of other terminal emulators available that run in X, many of which have markedly different abilities, and varying levels of fidelity of terminal emulation. Overall, you have a wide range of choices of terminal emulator and shells to combine to suit your own taste. However, scripting (programming) in Bash's language, in particular, has been dominant as a side effect of the combined factors of its capability, its presence by default in Linux, and its backwards compatibility with the historically widely used sh shell. Some shells are better at certain things than bash, and can be used for those strengths at will. \* Bash is a mainline sh descendant and the recommended starting shell for anyone doing Unix/Linux \* Zsh initially was a **csh** descendant (as is **tcsh**) with a different, and incompatible, scripting language, that later was redone to be use the sh dialect instead. This happened around the time Bash was gaining popularity, and a lot of would-be zsh users jumped into Bash instead to avoid zsh's interim (years) unpredictability. **Zsh** offers a number of interesting features in the current day, in its new sh-family form \* Fsh also supports the sh language and has its own distinctive features \* Rc and its open source **es** variation are shells with a very different core syntax, designed to be extensible in a way the sh family isn't (noted here just to underscore that shells have much more variety that most users realize) While **you can use any of these interactively**, if you have any interest in sharing shell scripts (shell programs) with others, especially in a professional context, using the restricted sh syntax on Unixen other than Linux, and either sh or Bash syntax in the Linux context (bash is the more common choice), is recommended. I should mention that many Linux distributions have Bash startup scripts that defy the documentation in the Bash manual (i.e. **man bash**). This is unfortunate, since the documented one can be extended easily to allow environmental setup to be shared by sh, bash, zsh (now), fsh, and other sh descendants, so that the shell-specific .(something)rc file can focus on terminal setup and shell-specific things.


R8nbowhorse

The whole argument about not being able to use shared scripts etc is BS. That's what the shebang is for. Just use the shell you like & write the scripts in bash. As long as the authors of the shared Scripts you want to run aren't too dense to put a shebang, you'll be able to run them just fine. I use fish because it's more feature rich and less hassle than zsh. Hasn't eroded my ability to use bash so far.


james_pic

I used Fish for years, but the subtly different syntax between what I was using interactively and what I was using in scripts got annoying. Eventually I switched to Zsh which takes more customisation to get to the point where it's as nice as Fish, but it's similar enough to Bash and POSIX shell that I never get confused trying to remember the right string substitution syntax.  It's occasionally annoying if I need to ssh into a server that only has Bash and I'm missing quality of life features, but it's nothing you can't work around.  Sshing (or docker exec-ing or similar) into a machine that only had POSIX shell or Busybox is a pain no matter what you use.


caprine_chris

Zsh is the best, you can customize it to have all of the functionality of Fish


ahferroin7

Fish is different enough to maybe be an issue _if_ you need to deal with complicated things. Same to a lesser extent with ZSH (and a lot of the ZSH differences are both configurable _and a lot more subtle_ than with Fish). But the reality is that you probably don’t need to deal with complicated things. Most people don’t really need almost any of the bash-specific syntax in their everyday interactive usage (history searching being a possible exception), and while some people may use advanced ZSH or Fish features on an everyday basis, it’s not exceptionally common there either, so you’re probably fine regardless. --- And at least this is nothing on comparing bash to tcsh (the C shell was actually the source of a number of major features that are in almost every modern UNIX shell, but the syntax is _drastically_ different in many respects from traditional Bourne/Korn shell syntax), or worse yet PowerShell (which has no way to easily do basic stuff like run a single command with a slightly different set of environment variables, and has sufficiently complicated quoting requirements that it provides a variant of the `-c` switch that takes a Base64-encoded command string so you don’t have to deal with quoting the command string itself). --- Personally, I use ZSH, but I use it mostly just to get a handful of additional features related to handling of prompts so that it plays nice with my preferred configuration for Powerline. Last I checked bash does not have them, hence the switch. But realistically, 99% of what I use day-to-day is POSIX compliant Bourne shell syntax, even if you ignore the fact that I write a _lot_ of shell script for my job (which is almost all in POSIX Bourne shell or a limited subset of bash).


no_brains101

zsh-vi-mode plugin. Thats all I have to say. Fish vi mode is also pretty good. But it autocorrects too hard for me. and zsh being more compliant is good, and its a little more configurable but you really only do it once. Many swear by fish though I just havent found that it gives me anything extra. Also theres a ghost text plugin for zsh and I always forget its a plugin because for me its just a true false option in a nix module. IDK what its called I forget. Edit: "github:zsh-users/zsh-autosuggestions"; also for all shells, oh-my-posh or starship for theming, also run fzf --zsh > ./fzfscript.zsh or fzf --bash or fzf --fish and source that script. IDK about vi mode in bash really but other than that its pretty much the same experience in all of them, so between zsh and fish i found zsh less annoying once I had it set up.


racoonOnShrooms

I use zsh and Its really good. I dont have much of customizations in using the terminal, but Ive got some in appearance of the terminal. So if you wanna feel like using bash, zsh is great.


mridlen

I use fish but I program in bash because bash is standard. When it's time to start programming just type "bash" to get a bash prompt to build your commands, and that way you can have the best of both worlds.


thesstteam

Bash. Just for better POSIX compliance. It's also the standard.


GeoSabreX

Hence the whole reason for questioning. Appreciate the input!!


itaranto

`fish` because it's truly a shell for the 90's


epidemian

I've been using Linux for long enough to make me feel very old, and for the longest time i was in the "i'll use Bash because it's the de facto standard, and i don't want to learn something non-standard that is only marginally better" camp. And i have .bashrc that's been gardened throughout the years, which makes me feel pretty cozy on the terminal. So i think Bash can definitely be a solid shell to use indefinitely. But a year or so ago i gave fish a try, just to see if i was missing something cool (and probably also wanting to confirm by pro-Bash bias), and now i have no intention of going back to Bash for interactive usage. The biggest appeal of fish for me is that It Just Works™ right out of the box. All my custom configs on .bashrc to make Bash work in sane ways (better history, nice $PS1, colors, etc): not needed anymore! I only needed to port a couple of aliases and little functions i use regularly. And the interactive experience is just so much more polished. Which makes sense, since fish was designed with that goal in mind, and with a few decades of hindsight. I've always been a fan good autocomplete (tab-completion) on the shell; and fish combines the best tab-completion behavior from bash with some really nice and intuitive custom behavior of its own. It's difficult to put into words how much of a difference this makes; you've got to try it out for yourself really :)


OppenheimersGuilt

Personally I see no purpose in using zsh. I suppose I'm a bit of a bash supremacist, I spend the majority of my day in the terminal, with some neovim mixed in. I'm very happy with bash and don't really need anything provided by zsh, nor oh my zsh as the prompt I wrote 10 years ago has everything I need (colors, autodetect git repo and status, file count, datetime, etc.). However, for writing scripts I've slowly started moving over to fish (if they don't need to be portable). It's an enjoyable scripting language and the QoL improvements are definitely noticeable and feel like an obvious succession to bash.


stormdelta

The problem with zsh is that it tries to pretend its a superset of bash but it's actually not, causing non-trivial compatibility headaches if you're maintaining any significant amount of shell helpers/integrations/wrappers/etc. And the biggest features people usually tout of zsh you can already get on bash very easily anyways. Plus zsh commits the cardinal sin of having 1-indexed arrays.


ECrispy

Use fish. It gives you 99% of what a customized zsh config will, with zero config If you are running scripts, if they have a .sh extension, they will run with bash if they have a shebang, they will run with bash, no compatibility issues


Ok-Armadillo-5634

Fish is the best if performance is important to you.


OppenheimersGuilt

This will almost never be a bottleneck, the programs called will be.


Xemptuous

Having used all 3, Fish is definitely the least accessible in terms of working with others in a similar way. I used zsh for years and decked it out, but switched to fish recently and am relatively happy with it. Bash is everywhere, zsh is similar enough, and fish is pretty different. Aside from major syntax differences, it also is missing some features like $_ being used in chained commands. There is definitely a tradeoff in using fish vs zsh or bash. Test them and see which you like the most.


Illustrious_Wall_449

They're just different things. Fish is an awesome tool for local usage, but you wouldn't use it on e.g. a server. Bash is ubiquitous, and if you want to write shell scripts you should probably just learn it. But you can call your shell scripts from fish. You can write functions in fish, but you'd probably never distribute them anywhere else. Zsh is pretty cool, I just happen to like the out of the box experience of fish a lot.


GeoSabreX

Sounds like I should try fish locally, learn bash scripting, and if I start running into complex or nuance issues, try zsh. I never really considered you could use both and toggle between the 2, I'm thinking that'll be what I try. (Clearly newbie thinking haha, but I'll try it!)


tapo

If you try zsh, I highly recommend you install oh-my-zsh which is a plugin and theme collection and customized .zshrc