6 ms·
Do yourself a favor and try to configure your shell without ohmyzsh first. You’d be surprised at how few plugins actually require it, and you save yourself from
by pprotas 3y ago
Do yourself a favor and try to configure your shell without ohmyzsh first. You’d be surprised at how few plugins actually require it, and you save yourself from horrible performance.
- BytesAndGears 3y agoYeah I have a ton of customization including a really sweet looking prompt (that includes branch name & even git remote project name). Shortcut aliases and custom functions for everything that I use often. Atuin for Ctrl+R history searching. All without using any “plugins” or ohmyzsh. All just within my .zshrc, and a few extra files that get “sourced” depending which computer I’m on. Only occasional copy-pasting a few things I liked from StackOverflow. Basically instantaneous speed. Don’t even notice any performance penalties from all of the customization and styling. I did have a performance issue early on, but I profiled my zsh startup time and saw 97.5% of my shell startup was consumed by NVM (node version manager), and another 2.4% was RVM (ruby). Switched to FNM and Chruby instead, and it was zippy. And it’s all mine, so there are no “updates” to break anything. Throw it all in source control and you can keep improving it without risk of losing your previous working config.
- sshine 3y agoCustomizing my prompt was a reason to stick to zsh instead of oh-my-zsh. But lately I've become really happy with just installing spaceship. Sure, it doesn't look exactly like I want it to. But it shows git status. Various features just "pop up" if I install the right things on the system.
- tough 3y agostarship is the new spaceship, yo https://starship.rs/ https://starship.rs/
- nunez 3y ago100%. This is dotfiles on super easy mode. PS1 and PROMPT_COMMAND are your friends!
- drcongo 3y agoNobody is friends with PS1.
- BossingAround 3y agoI hate very few things, but PS1 is one of them. Would recommend using a PS1 generator, e.g. [1]. [1] https://bash-prompt-generator.org/ https://bash-prompt-generator.org/
- d3w4s9 3y agoI do myself a favor by not doing this, install ohmyzsh and start working. Seeing what other people have done with shell, vim and all sorts of things, I know this is a rabbit hole and I could spend endless time on it. That's why I use ohmyzsh, VSCode and other tools and only tweak settings when necessary. And I can be actually productive even when I get a new machine. Performance? If you are talking about the startup performance, no it doesn't bother me. Again, nothing is slowly enough to cause noticeable delays in basic typing/editing and the bottleneck is almost never on them. (I regularly work on codebase of hundreds to thousands of files or more.) So I don't spend time worrying about saving a few seconds in total per day when I can use my brain elsewhere.
- latexr 3y agoYou don’t have to follow a rabbit hole, these tweaks take no time at all and you can stop whenever. I used Oh My Zsh until I got fed up with the startup slowness. I open a bunch of terminal windows during the day and every one of them had a second or two of delay before I could do anything. I decided to do myself a favour and no longer put up with it. It took me a handful of minutes to figure out which plugins I actually cared about (three) and get rid of Oh My Zsh entirely. Everything about this change is better for me: it’s easier and faster to redo the setup when I do a clean install, and it’s instant in everyday use which means it’s no longer frustrating.
- Ingaz 3y agoI heard a lot about slowness of oh-my-zsh but never experienced it myself. I had slow starts when I added nvm completion to .zshrc and .. maybe conda environment but that was unrelated to oh-my-zsh
- latexr 3y ago> I heard a lot about slowness of oh-my-zsh but never experienced it myself. This was years ago, no idea how it is today. But I also have no reason to go back. > I had slow starts when I added nvm completion to .zshrc That too, but that’s unrelated. To me that was yet another reason to stop using node altogether, I wasn’t enjoying it anyway.
- nickjj 3y agoYep, I use zsh with 2 plugins. One for syntax highlighting commands and another for showing auto-suggestions. It's really fast. The rest is nearly a default zsh set up in terms of zsh configuration. Everything is documented in my dotfiles https://github.com/nickjj/dotfiles https://github.com/nickjj/dotfiles. My prompt is a 1 liner that shows your git branch as well as coloring up $ to be red or not based on if the last command failed. Coincidentally I just released a blog post today on coloring up your prompt based on if the last command failed at https://nickjanetakis.com/blog/color-your-shell-prompt-red-if-the-last-command-threw-an-error https://nickjanetakis.com/blog/color-your-shell-prompt-red-i... , there's solutions for both zsh and bash.
- JNRowe 3y agoNoting that you didn't solicit advice, but… * Exporting shell variables such as HISTFILE isn't necessary, and can be unsafe. For example, if you decide to pop open unconfigured bash from within a zsh session it would intermingle its history on write. * There is a smart keyboard subsystem that neatly manages terminal differences¹, making it much nicer compared to inserting {system,term}-specific escapes in to your config. Hoping this comes across in the helpful spirit it was intended, not as nitpicky unwanted code review. ¹ https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#Keyboard-Definition https://zsh.sourceforge.io/Doc/Release/User-Contributions.ht...
- nickjj 3y agoThanks, I'm always open for advice. * For shell history I don't think I've encountered that issue yet. For example if I have zsh loaded and run `bash` and then within that bash session run `whoami` and exit bash, my `history` within zsh doesn't include the whoami command, only `bash`. Is there another workflow that would produce intermingled history? * Ah, this is likely in reference to the home / end / insert / etc. key binds I added? I think I came up with those from following a 2007 blog post[0] which I found here[1]. Do you know what the nicer versions would be for those specific keys? The docs are coming up empty with specific examples and most Google results return the escaped references. [0]: https://blog.andrewbeacock.com/2007/08/how-to-get-home-end-keys-working-in.html https://blog.andrewbeacock.com/2007/08/how-to-get-home-end-k... [1]: https://stackoverflow.com/questions/8638012/fix-key-settings-home-end-insert-delete-in-zshrc-when-running-zsh-in-terminat https://stackoverflow.com/questions/8638012/fix-key-settings...
- alright2565 3y agoSomeone's made a benchmarking system for zsh: https://github.com/romkatv/zsh-bench#premade-configs https://github.com/romkatv/zsh-bench#premade-configs Of course, their config is the best according to the benchmark (and ohmyzsh is the slowest option), but DIY configs are also covered, particularly possible performance optimizations.
- wesapien 3y agoJust pull down the extensions from the source repo and source them in your zshrc.