Live data from Hacker News

Oh My Zsh adds bloat

rushter.com

211–220 of 304 posts

Re: Oh My Zsh adds bloat

#211
post #159

Earlier quoted context omitted.

I tried using Starship, and it’s clearly faster than Oh My Zsh, but my issue was that I relied on some useful Oh My Zsh features that I didn’t know how to replicate in Starship. One of these is history filtering - for example, when I type source and press the up arrow, I only see previously run source commands, which makes it easy to find what I’m looking for. I tried to get this working in Starship, but had no luck.

Control r. This is a zsh feature not a starship/oh my zsh feature

mirzap was probably using some omz plugin to do that, so if starship fully replaced omz, that functionality went away, too.

Re: Oh My Zsh adds bloat

#212
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…

> you can always do C-x C-e in bash/zsh (M-v in Fish).

Thanks I didn't know!

Re: Oh My Zsh adds bloat

#213
post #159

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 tried using Starship, and it’s clearly faster than Oh My Zsh, but my issue was that I relied on some useful Oh My Zsh features that I didn’t know how to replicate in Starship. One of these is history filtering - for example, when I type source and press the up arrow, I only see previously run source commands, which makes it easy to find what I’m looking for. I tried to get this working in Starship, but had no luck.

check atuin for history search

Re: Oh My Zsh adds bloat

#214
post #148

Earlier quoted context omitted.

I've been using fish for nearly 10 years. First, there are some ways to make fish more compatible with bash. If you want to do some shell scripting in fish, or running other people's shell scripts (or commands) this may aid you since you wouldn't have to port them (or take less time to port them over). You can achieve this with a plugin system such as 'oh my fish' or 'fisher'. But, as always, it adds complexity (and…

./script.sh and script.sh just starts with #/bin/bash I'm simple

This wouldn't work if the script is meant to be sourced (to set environment variables) isn't it?

Re: Oh My Zsh adds bloat

#216

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.

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.

This is common low-quality internet arguing ("you care enough to come into this thread but..."). You can avoid this by keeping in mind that different things are different things, and analogies have many holes by default.

Re: Oh My Zsh adds bloat

#217
post #183

Earlier quoted context omitted.

I use atuin for the shell history as it seems to know when I've run a command in one tab/split while another is open where fzf doesn't seem to sync it all the time. But I still use fzf to find files. (Bonus, I use Zoxide to replace the alt+d cd shortcut as it's much faster, and use https://github.com/Aloxaf/fzf-tab for tab completions in the terminal to become fuzzy, very very useful)

>it seems to know when I've run a command in one tab/split while another is open where fzf doesn't seem to sync it all the time. On my machine this is handled in zsh, not fzf (but then fzf still benefits). You can configure your shells to sync without exiting. You may need to run one command (or just hit enter with nothing typed, maybe) for the shell history to catch up, but then it should all be there. Relevant opti…

Yeah I believe I have these already configured as such, it was that atuin didn't require me to press enter again but thank you for sharing

Re: Oh My Zsh adds bloat

#218

Earlier quoted context omitted.

./script.sh and script.sh just starts with #/bin/bash I'm simple

This wouldn't work if the script is meant to be sourced (to set environment variables) isn't it?

No, it doesn't.

The way I actually have things setup, in case it helps. I don't change my default shell. I actually default to pretty much working within tmux. So, I kept my default shell to what the OS brings, then in my tmux config, I have,

    # set shell
    set -g default-shell /opt/homebrew/bin/fish
This means, that when I start my terminal, it drops me to zsh (macOS default). Then when I run tmux, it opens fish. The nice thing is that I inherit the environment of zsh.

I have my .zshrc and my .bashrc sourcing a .shellrc file which contains most of my env stuff. This keeps random utilities that write to .bashrc and zshrc working within fish too.

Re: Oh My Zsh adds bloat

#219

Earlier quoted context omitted.

> Fish is also not POSIX which has always been its, and my, issue Could you give some examples of issues you encountered because of that? I've been using fish for about 8 years now I can't remember an instance where that was a problem in interactive use.

For me it’s always been an inability to “copy this command from stackoverflow” (or in the modern day, it’ll be copy this from ChatGPT) into your shell. Maybe it’s better now, but the last time I seriously gave fish a chance was 2014. Also one of may main use case is documenting things other developers can do to make their life easier. There are handful of things where zsh behaves differently than bash. And while thos…

I confess I don't really get this. Fish and Bash are different languages in the same way that Ruby and Perl are different languages. And if I want to run a Perl script, I don't try to run it in a Ruby interpreter, and I don't get grumpy at Ruby for not being source-compatible with Perl.

Which is to say, if you need to run a Bash script, run it via `bash foo.sh` rather than `./foo.sh`. There's no need to limit yourself to a worse shell just because there exist some scripts out there written in that shell's language.

Re: Oh My Zsh adds bloat

#220
post #119

Earlier quoted context omitted.

[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)

It’s more that tired experience has taught that of the various disciplines, web devs are the most likely to have a shaky-at-best understanding of fundamentals, and thus do silly things like assume network calls will never fail, or store everything in JSON blobs and then wonder why their queries are slow.

I’ve also worked with some awesome web devs, to be fair.

Post reply on HN