Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

101–110 of 304 posts

Re: Oh My Zsh adds bloat

#101

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]

It's a tool.

Some chefs like to spend hours sharpening their knifes with wet stones. Others are just going to run it through a power sharpener and get on their way.

I like to focus my craft in places other than the terminal.

Re: Oh My Zsh adds bloat

#102
I never moved to omz (or even zsh; I still rock bash) because I have 10+ years of dotfiles that cover all of my needs. I can see all of the cloud accounts I'm logged into, the status of my Git repositories when I'm cd'ed into them, the number of directories deep my stack is when I use pushd, and have lots and lots of custom functions that save me time. I had moving to zsh in my personal backlog for many years but have yet to come across a pressing reason why I should!

Anyway, yeah, all of this adds startup and command invocation time, but the value far outweighs the latency.

Re: Oh My Zsh adds bloat

#103
My zsh config has three things:

    setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
    bindkey "^R" history-incremental-search-backward
    autoload -Uz compinit && compinit
The first one is mentioned in `git-prompt.sh` that comes with git, which needs to be sourced as well.

Re: Oh My Zsh adds bloat

#105
post #102

I never moved to omz (or even zsh; I still rock bash) because I have 10+ years of dotfiles that cover all of my needs. I can see all of the cloud accounts I'm logged into, the status of my Git repositories when I'm cd'ed into them, the number of directories deep my stack is when I use pushd, and have lots and lots of custom functions that save me time. I had moving to zsh in my personal backlog for many years but hav…

I'm changing to GhosTTY as we speak (from Mac Terminal, because I'm tired of gemini-cli not getting my shift-return for newlines). Wasn't until that process that I learned that new Mac accounts are on a different shell (zsh) than I have (bash). Last time I switched shells was when Apple flipped from tcsh.

Now, I'm deep down the rabbit hole of standardizing all my shells/terminals/configs with Nix. Either a really good or really bad project to start on a Friday night.

Re: Oh My Zsh adds bloat

#106

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.

..have you checked. It's 0.04s in my setup. I have it a bit customized but I don't remember chasing milliseconds on config

Re: Oh My Zsh adds bloat

#107
I was annoyed by this enough that I ended up cloning the OMZ repository locally, and stripping out all the modules I don’t use. And now I just have it as part of my dotfiles[1].

It's just a handful of files and I manually source them in my zshrc[2]:

    source $ZSH/lib/async_prompt.zsh
    source $ZSH/lib/key-bindings.zsh
    source $ZSH/lib/completion.zsh
    source $ZSH/lib/history.zsh
    source $ZSH/lib/git.zsh
    source $ZSH/lib/theme-and-appearance.zsh
It's essentially the same as omz setup I was using before, but loads in just ~25ms (Note: it's on a hard drive, with ddr3 ram and 18ms out of that is spent by compinit)

It also fixed another issue I had with Oh-My-Zsh: whenever they (very rarely) tweak their default config - it breaks my muscle memory.

[1] https://codeberg.org/janAkali/dotfiles/src/branch/main/confi...

[2] https://codeberg.org/janAkali/dotfiles/src/branch/main/zshrc

Re: Oh My Zsh adds bloat

#108
post #102

I never moved to omz (or even zsh; I still rock bash) because I have 10+ years of dotfiles that cover all of my needs. I can see all of the cloud accounts I'm logged into, the status of my Git repositories when I'm cd'ed into them, the number of directories deep my stack is when I use pushd, and have lots and lots of custom functions that save me time. I had moving to zsh in my personal backlog for many years but hav…

It's basically the same, except smarter about command history and auto-completion by default. I'm sure you could get Bash to act the same way with a bit of prodding.

Re: Oh My Zsh adds bloat

#109
post #10

Earlier quoted context omitted.

Show me an environment where I can interact with my system programmatically, where I can compose together arbitrary tools, and which will never, ever, ever break on me, and I'll switch! My experience with graphical environments has been that they rarely compose, often break, and constantly make arbitrary changes that break my workflow. So every time I try something else I end up coming back to the terminal. But I agr…

https://fishshell.com/ https://xon.sh/ https://www.nushell.sh/ https://elv.sh/ You're replying to someone that says POSIX shells are holding people back, not that the terminal is a bad idea, there are many alternative shells which offer benefits over POSIX shells. fish-shell has everything you want from an interactive shell included, xonsh is a mix Python shell, nushell and elvish are adding types and other things to…

Now I'm tempted to try xonsh. It looks like it support the amount of bash that I know, and everything else I can just do in Python. (TBH, the things that I would need Python for are obscure enough in bash that I wouldn't otherwise write them myself.)

Re: Oh My Zsh adds bloat

#110
post #55

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.

Never heard of this, looks pretty good. Are there any community themes based on starship like powerlevel9k/10k?

It requires a nerd font.
Post reply on HN