Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

271–280 of 304 posts

Re: Oh My Zsh adds bloat

#271
post #205

Earlier quoted context omitted.

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, completi…

fizsh sounds really cool, but the last commit was 7+ years ago. do you run into any issues? https://github.com/zsh-users/fizsh

I never noticed any issues, actually. I guess the zsh base is solid and stable.

Re: Oh My Zsh adds bloat

#272
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.

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.

Just tried Starship, even though it wasn't the first time I'd heard about it. I would not say it is a 'drop-in and go' experience. Let me explain.

After installing and adding it to my bashrc, I was wondering was those version numbers and cloud symbols meant. Turns out: Since NodeJS and Python were installed, it found a good idea to print the respective versions. I could not care less about those versions. The other part was that it thought that I would like to see my AWS region. Well, I mean, I have built something with AWS a few years back, and the config file for that still exists, but no, I don't want to see that region every time I open a shell. Finally, the default is to have the prompt in a new line. I think when you have a long prompt that makes sense, and it might also be a taste thing. However, the documentation has this example at the beginning about newlines:

  # Inserts a blank line between shell prompts
  add_newline = true
So I thought `add_newline = false` should do the trick, but it didn't.

Luckily, the AI (GPT-5.2) was pretty good at explaining and giving instructions for changing things. So after 30 minutes, everything was understood and configured to my liking. I like the result, but the default was pretty weird.

Re: Oh My Zsh adds bloat

#273
post #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.

Oh that’s good. I’m an emacs guy. I don’t like change.

Re: Oh My Zsh adds bloat

#274
post #153

Earlier quoted context omitted.

I just use fish shell. Way easier. https://fishshell.com/

Biggest problem being not being able to paste much of the complicated code found online. You can save it and run it via bash command though. oh my zsh can recreate much of the fish functionality while maintaining good bash interoperability.

This is the most common complaint I see for switching interactive shells to fish/nushell, but it's not a problem in practice. You don't ever uninstall bash, so if you've got a command to paste:

  bash 

   

  exit 
Tada!

Re: Oh My Zsh adds bloat

#275
I've been an oh-my-zsh user for many years now, being very happy with the very small set of features I use from it. Previously I could never think of trying to figure out how to replicate the features I need without the other features from oh-my-zsh, which does make the shell noticeably slower.

Just now, after reading this article, I used Claude code and have removed the OMZ config within 5 minutes. Here's my prompt - maybe others could find it useful. I ran this from `~/.oh-my-zsh`.

``` Here's my zsh config - I'd like to remove oh-my-zsh and replace the provided functionality with just raw zsh. i use starship for my prompt so i don't need any help there.

  can you explore the oh-my-zsh codebae and see what it would take to replicate the features it currently provides me in the shell?

  my zsh config below:

  export ZSH="$HOME/.oh-my-zsh"
  ZSH_THEME=""
  DISABLE_AUTO_TITLE="true"
  plugins=(direnv fzf)
  source $ZSH/oh-my-zsh.sh
--- CLAUDE RESPONSE --- Minimal Raw Zsh Replacement

  Since you use starship and have DISABLE_AUTO_TITLE=true, you can skip prompt and title-related code. Here's what you'd need:

  # Completions
  autoload -Uz compinit
  compinit

  zstyle ':completion:*' menu select
  zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'  # case insensitive

  # History
  HISTFILE=~/.zsh_history
  HISTSIZE=50000
  SAVEHIST=10000
  setopt extended_history hist_expire_dups_first hist_ignore_dups
  setopt hist_ignore_space hist_verify share_history

  # Directory navigation
  setopt auto_cd auto_pushd pushd_ignore_dups pushdminus

  # Key bindings (emacs mode)
  bindkey -e
  bindkey '^[[H' beginning-of-line      # Home
  bindkey '^[[F' end-of-line            # End
  bindkey '^[[1;5C' forward-word        # Ctrl-Right
  bindkey '^[[1;5D' backward-word       # Ctrl-Left
  bindkey '^[[3~' delete-char           # Delete

  # Colors
  autoload -Uz colors && colors
  export CLICOLOR=1  # macOS ls colors

  # Plugins replacement
  eval "$(direnv hook zsh)"
  eval "$(fzf --zsh)"
```

Granted I've only done this like 5 minutes ago and might be missing functionality I'll realise later, but a quick few checks give me hope I have all the functionality I want.

Re: Oh My Zsh adds bloat

#276

huh, is this a problem people really have? I just have a plugin that lets me type before zsh loads and I don't really have a problem with this, even before that i didn't really notice a problem since my 'default' configuration is .12s. time zsh -i -c exit zsh -i -c exit 0.12s user 0.09s system 81% cpu 0.276 total ~

What plugin?

Re: Oh My Zsh adds bloat

#277

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…

That's why I switched to Mise (https://mise.jdx.dev). Having new terminal sessions taking up hundreds of milliseconds because of nvm isn't the end of the world, but it's annoying when you're in the middle of something.

Mise reads in your .nvmrc files so you don't have to configure anything new.

Re: Oh My Zsh adds bloat

#278

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.

Really curious what is missing from the default configuration in your setup. If I'm feeling really fancy I may enable vim bindings and add the fuzzy find plugin, but plain fish is so good on its own.

Best shell UX for minimal effort is: fish shell + starship prompt.

Using starship for the prompt provides many pretty UX improvements (showing current git branch, language version, kubernetes context, etc.).

Re: Oh My Zsh adds bloat

#279

huh, is this a problem people really have? I just have a plugin that lets me type before zsh loads and I don't really have a problem with this, even before that i didn't really notice a problem since my 'default' configuration is .12s. time zsh -i -c exit zsh -i -c exit 0.12s user 0.09s system 81% cpu 0.276 total ~

What plugin?

  # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
  # Initialization code that may require console input (password prompts, [y/n]
  # confirmations, etc.) must go above this block; everything else may go below.
  if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
    source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
  fi

Re: Oh My Zsh adds bloat

#280
I have been using omz for YEARS. I have practically grown up with it. I resent that I would have never noticed that it took several hundred milliseconds to load, if it were not for this discussion. I never felt the delay particularly unless I was in a very large Git repository — which is rare. On the bright side, now I know about `fish` and am learning there are some nice features I never had in ZSH (i.e. much more advanced autosuggest.) What I basically use omz for is 1) autocomplete, 2) git aliases, and 3) my beloved prompt. In about 30 minutes, Claude helped me port my prompt from ZSH, autocomplete comes OOB, and a cursory Google search shows someone has made a Fish plugin to satiate my Git alias muscle memory. I could leave Zsh/omz in the rear view mirror tomorrow — but for why? I never would have noticed before this discussion...
Post reply on HN