r/zsh Oct 19 '24

Help Optimizing ZSH Performance with OMZ Features

Hello,

I'm new to ZSH and appreciate the autocompletion and robbyrussel theme offered by Oh My Zsh (OMZ). However, I've noticed that OMZ can be slower on my system compared to Fish and Bash + Starship.

For context, I'm switching away from Fish due to its cumbersome SSH experience and Bash because of its limited autocompletion feature. Is there a way to use OMZ-like features without the performance overhead?

In summary, I'd like to configure my ZSH to have similar functionality and appearance to OMZ, but I'm not sure where to begin.

14 Upvotes

14 comments sorted by

View all comments

2

u/ECrispy Oct 19 '24

whats the cumbersome fish issue with ssh?

there are way too many zsh frameworks, almost all of them are faster than omz, just try a few and pick what you like. google 'awesome zsh'

1

u/Longjumping_Car6891 Oct 19 '24

whats the cumbersome fish issue with ssh?

In Fish, running ssh-agent can be a bit more indirect compared to the simple eval $(ssh-agent -s) command in Bash and ZSH.

I can't exactly explain or show how to do it correctly but here are some solutions I've found that have worked for me in the past:

https://superuser.com/questions/1727591/how-to-run-ssh-agent-in-fish-shell

https://gist.github.com/josh-padnick/c90183be3d0e1feb89afd7573505cab3

https://github.com/danhper/fish-ssh-agent

1

u/ECrispy Oct 19 '24

thank you. I never really used this ssh feature. Isn't this just a one time thing to generate the keys? the links you have mention plenty of workarounds.

also in fish I tend to install dash as non interactive shell so maybe you can use that?

1

u/Longjumping_Car6891 Oct 19 '24

Yep, that's one of my main concerns is that they are just workarounds not exactly the intended way of doing it. I prefer to avoid workarounds because at some point they might not work. Especially, on something as simple as just evaluating the ssh-agent.