Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

201–210 of 304 posts

Re: Oh My Zsh adds bloat

#201
post #191
post #169

Earlier quoted context omitted.

For POSIX: I leave Bash as the system shell and then shim into Fish only for interactive terminals. This works surprisingly well, and any POSIX env initialisation will be inherited. I very rarely need to do something complicated enough in the REPL of the terminal and can start a subshell if needed. Fish is nicer to script in by far, and you can keep those isolated with shebang lines and still run Bash scripts (with a…

I often write multi-line commands in my zsh shell, like while-loops. The nice thing is that I can readily put them in a script if needed. I guess that somewhat breaks with fish: either you use bash -c '...' from the start, or you adopt the fish syntax, which means you need to convert again when you switch to a (bash) script.

I guess my workflow for this is more fragmented. Either I’m prototyping a script (and edit and test it directly) or just need throwaway loop (in which case fish is nicer).

I also don’t trust myself to not screw up anything more complex than running a command on Bash, without the guard rails of something like shellcheck!

Re: Oh My Zsh adds bloat

#202
Exactly why I switched to fish. Fish doesn't come preconfigured exactly how I would like, but it's close enough that I just grew accustomed to fish defaults and have no trouble with it now, and no longer give any thought to shell configuration.

Re: Oh My Zsh adds bloat

#203

Exactly why I switched to fish. Fish doesn't come preconfigured exactly how I would like, but it's close enough that I just grew accustomed to fish defaults and have no trouble with it now, and no longer give any thought to shell configuration.

The additional upside of this approach is that you can also quite easily install fish on any host and it won't need any configuration to match what you're already used to

Re: Oh My Zsh adds bloat

#204

Earlier quoted context omitted.

> Fish is also not POSIX which has always been its, and my, issue Could you give some examples of issues you encountered because of that? I've been using fish for about 8 years now I can't remember an instance where that was a problem in interactive use.

Issue is the cognitive overhead to know 2 distinct shell languages. One you use, and one (almost) everyone else uses. If later isn't of your concern and Fish is all you interact with then no issue whatsoever for interactive or/and scripting use.

Not to be funny, but is POSIX scripting even still relevant? It's well understood that they should only be used for quick and simple tasks, and anything more serious or demanding should be done using something like python instead. But these quick and dirty tasks are very easy for LLM coding agents to do in python. I used to have dozens of shell scripts, each no more than tens of lines long, in my ~/bin/, but I had an LLM rewrite all of them in python, adding proper argument handling, --help messages and error handling too in the process. I sincerely don't think I'll ever write another bash script again.

Re: Oh My Zsh adds bloat

#205
post #96

Earlier quoted context omitted.

Try https://starship.rs then. Starship gives you the same "drop in and go" experience but without the 200ms+ prompt lag. One curl -> one line in your rc file, works on zsh/bash/fish/whatever. Configuration is straightforward and easy imo: https://starship.rs/config/ Give it a spin, I think you won't regret it.

I'm so glad I switched to fish, I'd rather have genuinely good settings out of the box rather than endless configuration, and honestly it's much better out of the box than any configuration I've ever had. Only drawback is that it's not POSIX, no issue for me, but maybe for people who have a lot of muscle memory with bash.

I tried fish for a while but as someone who heavily used bash before I couldn't get used to the new language. I also didn't feel they the language was much better than bash, at least for my usage. But I loved the default automatic coloring of arguments, underlining of files, etc.

Later I found fizsh, which I love and still use as default shell now. It's basically a configuration around zsh adding the colors, completions, and other good stuff inspired by fish to zsh. Can really recommend it for those who are used to zsh or bash but want their CLI to be more readable. Colors especially help with big command line arguments to show where they start and end, and keeping track of complex stuff like loops and conditional logic in your commands.

Re: Oh My Zsh adds bloat

#206
post #177
post #4

I use oh my zsh for exactly one reason: I can get a good shell experience out of the box and immediately start working on stuff productively, whether it's a new machine, a new remote host or a container. I could spend hours figuring out all those things, bit I'd rather use that time for something more important.

FWIW if you're on a machine where you're allowed to use non-default configs like oh-my-zsh, you could also just copy over your own custom config. It seems like you're implying the alternative to using oh-my-zsh is to rewrite your config from scratch every time or use the default. It doesn't quite add up to me. If you craft a config file of your liking one time, then back it up somewhere, track it with git, whatever,…

> just copy over your own custom config

That already defeats the purpose:

I don't want to copy things around

I never spend time crafting a custom config

Re: Oh My Zsh adds bloat

#207
post #148
post #96

Earlier quoted context omitted.

I'm so glad I switched to fish, I'd rather have genuinely good settings out of the box rather than endless configuration, and honestly it's much better out of the box than any configuration I've ever had. Only drawback is that it's not POSIX, no issue for me, but maybe for people who have a lot of muscle memory with bash.

I've been using fish for nearly 10 years. First, there are some ways to make fish more compatible with bash. If you want to do some shell scripting in fish, or running other people's shell scripts (or commands) this may aid you since you wouldn't have to port them (or take less time to port them over). You can achieve this with a plugin system such as 'oh my fish' or 'fisher'. But, as always, it adds complexity (and…

./script.sh

and script.sh just starts with #/bin/bash

I'm simple

Re: Oh My Zsh adds bloat

#208
post #4

I use oh my zsh for exactly one reason: I can get a good shell experience out of the box and immediately start working on stuff productively, whether it's a new machine, a new remote host or a container. I could spend hours figuring out all those things, bit I'd rather use that time for something more important.

> I could spend hours figuring out all those things, This post is explaining how to set up those things. Less than five minutes to read.

Less than five minutes to read but how long to set up my own? The author only showed what he needs/prefers ("Here is my config for starship"). I'll need to navigate the documentation of starship to figure out all those options, which defeats the purpose. Their config documentation (https://starship.rs/config/) already gives me headaches.

And from the article

> Because cloud services are available globally, I've disabled them.

That's some bad defaults right there.

> When you run a command, it also shows how long it took to execute.

No I absolutely don't want this thing done by the author. Now I am fully in the "customize my config" territory.

Also, most of us are unlike the author, and 0.07s vs 0.38s startup time means no difference.

I think the point of the previous comment has been more than clear enough.

Re: Oh My Zsh adds bloat

#209
post #201
post #191

Earlier quoted context omitted.

I often write multi-line commands in my zsh shell, like while-loops. The nice thing is that I can readily put them in a script if needed. I guess that somewhat breaks with fish: either you use bash -c '...' from the start, or you adopt the fish syntax, which means you need to convert again when you switch to a (bash) script.

I guess my workflow for this is more fragmented. Either I’m prototyping a script (and edit and test it directly) or just need throwaway loop (in which case fish is nicer). I also don’t trust myself to not screw up anything more complex than running a command on Bash, without the guard rails of something like shellcheck!

I used to do it this way, but then having the mentally switch from the one to the other became too much of a hassle. Since I realized I only had basic needs, zsh with incremental history search and the like was good enough.

I don't care for mile-long prompts displaying everything under the sun, so zsh is plenty fast.

Re: Oh My Zsh adds bloat

#210

Earlier quoted context omitted.

> Fish is also not POSIX which has always been its, and my, issue Could you give some examples of issues you encountered because of that? I've been using fish for about 8 years now I can't remember an instance where that was a problem in interactive use.

Issue is the cognitive overhead to know 2 distinct shell languages. One you use, and one (almost) everyone else uses. If later isn't of your concern and Fish is all you interact with then no issue whatsoever for interactive or/and scripting use.

I write all my scripts in bash. I'm not learning a new language.

That's not a problem since it's available and when #/bin/bash or env bash is there, it just works.

My bash scripts are stored in a folder on my PATH, so it all just works.

Post reply on HN