Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
sariel84473yHow about just plain old bash?
Always works.
Never breaks.
Will run any scripts made for any bash system. -
As long as you remember what each plugin does and how you can work without plugins, everything is fine.
In my opinion, a lot of plugins are quite harmful as you get used to a behaviour that is only existant with this specific ZSH / fish configuration.
I guess it has to do with Mac moving from Bash 3 from 2006 installed by default to ZSH?
If yes, I'd recommend to use bash as a shebang in shells - but please, use homebrew and install Bash 5. The default bash in Mac is really from 2006 and useless. -
sadradev4613y@sariel i am 100% sure you haven't heared that these two saves both your eyes and your up arrow key
-
sariel84473y
-
sadradev4613y@sariel
Macos default shell is 100% black and white, in addition fish auto complete command, almost never type anything infull ... -
sariel84473y@sadradev I get it, I don't agree.
I personally hate autocomplete because 90% of the time it's not what I want and breaks any level of concentration I have because it's mildly infuriating to have a CLI version of clippy.
I also found it rage inducing when other devs I work with complain that my bash installer scripts didn't work for them because they used something entirely different than what was supported. It actually got so bad that they were trying to switch everything to their preference and I rejected every PR that contained the changes.
One time someone actually snuck one by me (this person was particularly pushy with the change), so I reverted the changes, asked them to fix it. Afterwards, I merged their changes back in, and promptly revoked their access to the repo.
🤷 To each their own though. -
@sariel I remember the fun pre systemd times with shell based init systems.
Migrating bashisms to pure POSIX shell was stuff for nightmares.
For scripts, everything you need is usually jq (JSON), coreutils, curl, GNU grep / awk / sed and BASH - they are widely supported across all platforms and OSes.
Our internal stuff is based on a modular, self written bash framework, cause it's... A lot. Supporting different languages (e.g. version detection of Java, PHP, Node JS, ...), Build systems (Gradle / SBT / composer / yarn / npm) and so on.
I would never use anything else than Bash for it - Bash has already enough complexity (e.g. parameter substitution) and features for everything one needs.
Most struggle with writing _simple_ and _efficient_ shell scripts - not with the feature set bash has to offer.
ZSH has in my opinion too many features - especially ones where I think it's a bad paradigm, e.g. the TCP / socket Features.
Long story short, I think bash is the only sensible default, unless you really want to shoot your brains out and go POSIX shell. Which is sth. - in my opinion - only someone who lost all his sanity would do.
Which brings me to the next point.
I like auto complete. Bash supports it. It's easily enabled, can be extended and done.
Aliases are a nemesis of mine, because they can lead to painful mistakes (eg forgetting which parameters are set in an alias - when parameters must be given in a specific order for specific behaviour, this can lead to wild goose chases if the parameter is appended multiple times).
ZSH would be never the less my choice - as it is built upon Bash - and has a POSIX compatibility.
Fish might be easier and more friendly, but at a great cost: You don't learn shell scripting.
Afaik, Fish has an entirely own syntax and nothing do with Shell scripting at all.
So when using Fish, you're a bird in a golden cage. Learning Fish won't teach you anything you can use outside the Fish environment. -
@stop Yes. No. Maybe.
Bash has /dev/tcp support - it's not a real Unix device, Bash intercepts the call (feature copies from KSH I think). Some distributions disabled this during compile time (I think it was Debian / SuSE... Not sure).
But /dev/tcp is really basic. You have to fickle around with exec for it to become useful, if I remember correctly.
https://zsh.sourceforge.io/Doc/...
ZSH has a full featured TCP and socket implementation - which I'm not entirely fond of. Hard to put in words - guess it boils down to the Unix philosophy of do one thing and do it well. The thought of someone using a shell as a server / REST kind of thingy terrifies me. -
have you heard of warp? it's a native terminal that is building a lot of the functionality that's in OMZ and fish natively into the terminal vs shell
Related Rants
I need someone to compare ohmyzsh and on-my-fish...
I can't decide which one is better ...
question
zsh
fish
oh-my-zsh