Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

121–130 of 304 posts

Re: Oh My Zsh adds bloat

#121
post #23

I may not need this sort of shell bling. And I don't use it. But my first Unix system was an early version of Xenix, which had the original Bourne shell that didn't even support cursor up to get a previous command. (I do use cursor up, C-r, and the shell editing commands.) But yesterday's conveniences become today's essentials, and those who came in after me have their expectations set by the much more sophisticated…

“Still gangsta” I mutter to myself as I syntax-highlight punchcard #818 by hand and Port-a-Punch a replacement.

Re: Oh My Zsh adds bloat

#122

I don't think 0.38s is a bad trade-off for convenience when the rest of the tools I need to do my job collectively are another 2s at shell startup. NVM alone adds 0.5-0.6s on my M4 Macbook Air. Bigger fish to fry if we're being practical.

Holy heck, I just profiled my zsh initialization and nvm was the big source of bloat, holy hell. Similar setup as you (M4 MBP), same amount of startup bloat. Lazy loading it fixes it. GPT-5.2 changed the nvm initialization script to: export NVM_DIR="$HOME/.nvm" _nvm_lazy_load() { unset -f nvm node npm npx _nvm_lazy_load [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" } nvm() { _nvm_lazy_load; nvm "$@"; } node() { _nv…

Although this is what Opus recommends, it will give you many issues as you don’t really have any node runtimes in the path (or worse if you do).

What I recommend is replacing it with $PATH=(a command to find the nvm default alias directory, detect the verion and load it from that specific version directory directly) so you always have default node in path and then lazy loading only nvm itself, so you can switch when you need to.

Sorry I don’t have the command handy as I’m on mobile but if you paste the above into Opus you’ll get it.

Re: Oh My Zsh adds bloat

#124

Earlier quoted context omitted.

Holy heck, I just profiled my zsh initialization and nvm was the big source of bloat, holy hell. Similar setup as you (M4 MBP), same amount of startup bloat. Lazy loading it fixes it. GPT-5.2 changed the nvm initialization script to: export NVM_DIR="$HOME/.nvm" _nvm_lazy_load() { unset -f nvm node npm npx _nvm_lazy_load [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" } nvm() { _nvm_lazy_load; nvm "$@"; } node() { _nv…

Although this is what Opus recommends, it will give you many issues as you don’t really have any node runtimes in the path (or worse if you do). What I recommend is replacing it with $PATH=(a command to find the nvm default alias directory, detect the verion and load it from that specific version directory directly) so you always have default node in path and then lazy loading only nvm itself, so you can switch when…

Thanks. I modified my comment to disclose that gpt 5.2 generated that modification. I'll try your suggestion.

Re: Oh My Zsh adds bloat

#125
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've spent few days and got some basic zsh settings adjust for me. Since then I'm mostly using zsh with very little configuration and I like it a lot. Yes, it's a steep curve, but I'm spending all my life in zsh, so I think that was good time investment for me. In my experience default zsh settings are good enough and require very little customization.

Re: Oh My Zsh adds bloat

#126

> The main problem with Oh My Zsh is that it adds a lot of unnecessary bloat that affects shell startup time. Wowsers! That +0.5 seconds delay will kill cats everywhere. We must microoptimise the startup time of shells!!! Or ... we could simply use bash and KDE konsole with, say, 10 tabs. That setup works for me since ages; admittedly I use bash just as a wrapper for simple actions as well as calling a gazillion of a…

Plus, how many shell can one individual open in a day ? I'm doing that once per day on a good day, maybe twenty if I have a lot of unplanned work on subprojects that needs to be done concurrently with my main task.

Re: Oh My Zsh adds bloat

#127
post #123

I switched to fish shell with star ship. Fish has autocomplete and syntax highlighting out of the box which is quite neat and the main features I use in omgzh so fish was a safe choice for me https://ruky.me/moving-from-zsh-to-fish-nixos-darwin/

Also, you probably don’t need to customize it at all, it’s more than good enough out of the box.

Re: Oh My Zsh adds bloat

#128

zsh is still crazy to me. I use bash for everything. I have no idea what I’m missing out on.

If you want vi history editing like you are used to in bash for the last 20 years it's subtly different in a manner that makes it insanity inducing. If you use the traditional emacs like editing it's much the same.

Re: Oh My Zsh adds bloat

#129

Are we really quibbling over 400ms startup delay to open a new terminal?

Yes, and hundreds of developers just spent 5 minutes reading about it.

This investment makes sense for OP who opens hundreds of terminal sessions, but does it make sense to bother about 1s delay when they start the terminal session once in a while? I have several sessions opened all the time, the last time I wasted my 1s on zsh was in 2025 when I rebooted my machine due to a nvidia drivers update.

Re: Oh My Zsh adds bloat

#130

zsh is still crazy to me. I use bash for everything. I have no idea what I’m missing out on.

I've been using it for the last 6 or 7 years and I can only remember one specific feature I use a lot: "unset HISTFILE" to disable history when I need to run commands with passwords. Other than that, oh-my-zsh with git, systemd, and fzf plugins. Saves a lot of typing. The main selling point for me is how easy it is to setup.

Space before the command will have the same effect
Post reply on HN