Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

171–180 of 304 posts

Re: Oh My Zsh adds bloat

#171
post #156
post #138

Earlier quoted context omitted.

I'm surprised Starship is so popular. It's missing really basic powerlevel10k features like empty segments. If you look at some examples: https://starship.rs/presets/gruvbox-rainbow You can see that when the segments are empty, they still appear as a 1-width segment, rather than entirely disappearing. It also makes you configure many things by hand. powerlevel10k has an interactive wizard that lets you design your pr…

Starship allows empty segments, I in this specific case it's just how the preset/theme works as it uses the Unicode character as separator and it needs to set the background and foreground colors depending on which modules is surrounded by

Every preset with powerlevel10k-style segments don't support hiding empty segments. Look at Pastel Powerline, Tokyo Night, Gruvbox Rainbow, Catppucin Powerline...

https://starship.rs/presets/#pastel-powerline

I tried making my own and the config TOML syntax isn't expressive enough to support hiding empty segments.

You're right that it's the thing with the Unicode character as separator, which all the alternatives handle just fine: powerlevel10k, tide, oh-my-posh... it's just everyone seems to love Starship, and that's what confuses me.

Re: Oh My Zsh adds bloat

#172
post #20

Earlier quoted context omitted.

> Less than five minutes to read. OMZ is still easier to set up consistently. That’s why we use it. If the concern is the bloat of OMZ then make FMZ - fast my zsh - that is just as quick to set up and doesn’t add “bloat”?

I won't spoil the article, but if you read to the end you'll find out what this "FMZ" project is called.

Can you spoil it for me, because I read it to the end and saw no mention of such a project. Unless you are referring to the DIY approach the article suggests.

Re: Oh My Zsh adds bloat

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

The problem with long startups is that they break the flow. I live in CLI. I open and close terminal windows all day long, sometimes just for quick 2-3 commands to check something. 100 new interactive shells a day is my guess. I already know commands to run, my fingers are ready to type, they already pressed the keys ti spawn a new shell and now they have to stop for 500 ms. Repeat these 100 interruptions every day and you get the death by 1000 spoons.

I don't use oh my zsh, but on one laptop zsh took 600ms to start. I narrowed it down to a strange "bug": adding even a single empty file to the custom fpath caused the slowdown. It bugged me so bad that I decided to try fish again, but this time for real. And this time it stuck with me. I like its architecture (defining functions to change its look-and-feel - great idea!) and of course its 32 ms startup time.

Re: Oh My Zsh adds bloat

#174
post #157

> For Vim users, I also suggest enabling Vim mode in Zsh. It makes editing commands much faster. I am also an avid Vim user but I disagree. The default readline is perfectly fine for single line commands (you do have to know your way around some basic commands though C-a/u/k/l/w...). To edit long commands in $EDITOR you can always do C-x C-e in bash/zsh (M-v in Fish). As a matter of fact everytime I pair program with…

I like to re-add the readline binds after enabling vim mode, and then I only leave insert mode occasionally. C-x C-e really is great, though, I think I do tend to reach for that if I need to do a big edit of a one-liner.

Re: Oh My Zsh adds bloat

#176
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 have been using fish for 10 years now as my main shell and it is just perfect.

Re: Oh My Zsh adds bloat

#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, you can keep making use of that config across other machines. I just set up a new personal machine recently, grabbed my dotfiles, now it's the same familiar feeling as my other machine.

Re: Oh My Zsh adds bloat

#179
post #153
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 just use fish shell. Way easier. https://fishshell.com/

I recreated my several hundred line + several plugins zsh config in a few dozen lines of fish and one plugin (fzf.fish), about 8 years ago. It’s been a joy to use.

Re: Oh My Zsh adds bloat

#180

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

Yes, I'll throw my hat into this group too. Bash is fine.

YMMV but I have found using zsh too frictitious to be helpful. Sure, theoretically zsh living in a bash world (lets face it, all scripts are bash) is completely fine but reality seems to differ. Copied a one liner from shell history into your script? Crash. Use arrays? Weird bugs. Use shell builtins? Whoa unexpected interactivity!!! Etc...

Bash is absolutely fine as a default shell. As an added benefit, you don't feel like an invalid once logged in to a container or server.

Post reply on HN