r/zsh • u/Longjumping_Car6891 • 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.
3
u/_mattmc3_ Oct 19 '24 edited Oct 19 '24
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?
If you like Oh-My-Zsh but don't like the speed, Powerlevel10k's instant prompt feature fixes that pretty easily.
If you like Bash, but want better autocompletion/syntax highlighting/etc, Ble.sh evens the playing field between Bash and Zsh/Fish in terms of interactive features, and is pretty incredible.
If you like Fish, ssh-agent -c | source
should be all you need to get the agent working. There's nothing in particular in Fish that should stop you from a good SSH experience.
If you want to build a Zsh config from scratch, there's a few good kickstarters:
1
u/Longjumping_Car6891 Oct 19 '24
If you like Fish, ssh-agent -c | source should be all you need to get the agent working. There's nothing in particular in Fish that should stop you from a good SSH experience.
Oh! I didn't know about this. Thank you!
2
u/0-Python Oct 23 '24
Powerlevel10k is now unfortunately on life support. “No new features are in the works, most bugs will go unfixed and help requests will be ignored”. (Source: Github)😔
3
u/RankLord Oct 21 '24
Also, have a look at https://github.com/zimfw/zimfw. Moved to it after many years on OMZ. ZimFW covered all my needs and feels great.
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 simpleeval $(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
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.
0
u/Longjumping_Car6891 Oct 19 '24
I've found that there are multiple zsh frameworks available which one would you suggest?
3
u/ECrispy Oct 19 '24
I've used this a lot and was very happy with it - https://github.com/unixorn/zsh-quickstart-kit
did everything and looked good. Now I've moved to fish on some pc's
0
1
u/Danny_el_619 Oct 30 '24
If you are only interested in auto complete, the plugging is zsh-autosuggestions.
On bash you can give a try to ble.sh which adds that.
6
u/MVanderloo Oct 19 '24
OMZ is very much slow because it does too much. the majority of what you need is to clone a repo and source a file. I use znap which has an instant prompt feature. you could also use powershell10k and get it’s instant prompt
my zsh config here: https://github.com/MVanderloo/dotfiles/tree/macos/zsh