Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

111–120 of 304 posts

Re: Oh My Zsh adds bloat

#111

Earlier quoted context omitted.

or asdf

I'm using Asdf too. Have heard well about Mise, but I haven't figured out what the difference is, so I have stayed with Asdf

mise has more features - it is a super set of asdf. For example it can set your env vars when you cd into a directory (like direnv). It also has tasks (which I haven't used) - they appear to be similar to what a Makefile does. So you can potentially replace three tools (asdf, direnv, make) with one.

Re: Oh My Zsh adds bloat

#112
> 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 aliases and mostly ruby scripts that do the real job. But damn I never knew there were guys who were concerned with +0.5 seconds delays caused by oh-my-zsh. The bloat! Oh my godsers!

Re: Oh My Zsh adds bloat

#113

What workflow involves opening hundreds of shells every day? Like, I've got a half dozen shells open at any given time, and sometimes I gotta refresh or reboot, but even on my worst day in looking at two dozen. How do you get to hundreds?

Temporary splits to run code close to the editor, tmux popups (they open lazygit or file manager on top of the current tab). Debug runs, where I want to preserve their output for some time, so I keep them in separate tabs.

Re: Oh My Zsh adds bloat

#114

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.

Prefixing a space on that command will keep it out of history.

Re: Oh My Zsh adds bloat

#115
post #25

Like many other people, I use oh-my-zsh for default setup and that's it. I literally use a single plugin for git and very actively autoload my custom functions to avoid startup delay. With my 384 line config and oh-my-zsh on, here are the results: $ hyperfine -N "zsh -lc 'exit 0'" "zsh -c 'exit 0'" Benchmark 1: zsh -lc 'exit 0' Time (mean ± σ): 54.5 ms ± 6.3 ms [User: 10.2 ms, System: 14.3 ms] Range (min … max): 38.1…

Better way to benchmark zsh startup time is with zprof. Add this to your ~/.zshrc:

    zmodload zsh/zprof
    .. rest of your zsh config ..
    zprof
And then restart terminal.

Re: Oh My Zsh adds bloat

#116
The problem with zsh, as with a lot of open source tools is bad defaults. If only zsh had a better out of the box experience then OMZ wouldn't be needed. I used maintain a lot of configs, over 10 years I just keep forgetting what did I set up. I don't want to be bothered with this anymore.

Re: Oh My Zsh adds bloat

#117

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() { _nvm_lazy_load; command node "$@"; }
  npm() { _nvm_lazy_load; command npm "$@"; }
  npx() { _nvm_lazy_load; command npx "$@"; }

Re: Oh My Zsh adds bloat

#118

Earlier quoted context omitted.

Caring enough to read a blog post and comment on hackernews, but not enough to copy/paste the changes from the blog post is a very fine line.

Not sure what your point argument is.

Their point is that what you complain about as "time consuming" is not time consuming at all and that you consumed more time reading the post and commenting on HN that actually installing starship.

In your defense I must say I installed starship ages ago but still not migrated to it from powerline-go because I'm lazy.

Re: Oh My Zsh adds bloat

#119

Earlier quoted context omitted.

That misses the point. I don’t even want to think about any of that stuff. It’s a single command to install oh-my-zsh. I can fire it off, check Slack, and come back in 5 minutes. If I have to take 5 minutes to setup it up, I’m just not going to do it.

[flagged]

> important webshit to build

hackernews: where a large portion of programmers are considered inferior because of the domain they work in (the domain where hackernews also lives)

Post reply on HN