Now I'm on the oh-my-zsh, but I'm not sure that it is perfect choice. What is the key difference between grml zsh config (github repo) and oh-my-zsh config? In which case should I prefer grml or oh-my-zsh?
-
1Here's another zsh configuration framework that looks promising: github.com/sorin-ionescu/prezto. I know this isn't related to the question but I just discovered it and thought you might be interested.– J.C. YamokoskiCommented Dec 14, 2012 at 2:38
-
Regarding prezto (but that's not in the question): it is much discussed though it's worth noting the last commit was 10 months ago and there is a lot of discussion that's led to a new repo.– Griffith ReesCommented Dec 27, 2016 at 17:25
1 Answer
I am unable to give a detailed report of their differences but I can at least give a broad overview that may help to answer some basic questions and lead you to places where you can learn more.
oh-my-zsh:
- Built-in plugin/theme system
- Auto updater for core, plugins, and themes
- Default behavior easily overridden or extended
- Widely popular (which means an active community)
grml-zsh:
- Very well documented
- Provides many useful built-in aliases and functions (pdf)
- Default behavior overridden or extended with
.zshrc.pre
and.zshrc.local
files - Actively developed but not as popular as oh-my-zsh
Basically, the most apparent differences between the two are oh-my-zsh's plugin/theme system and auto-updater. However, these features can be added to grml-zsh with the use of antigen, which is a plugin manager for zsh inspired by oh-my-zsh.
Antigen allows you to define which plugins and theme you wish to use and then downloads and includes them for you automatically. Ironically, though, most of the plugins and themes are pulled from oh-my-zsh's library which means in order for them to work antigen must first load the oh-my-zsh core. So, that approach leads to more or less recreating oh-my-zsh in a roundabout way. However, if you prefer grml's configuration to oh-my-zsh's then this is a valid option.
Bottom line, I believe you just need to try both and see which one works best for you. You can switch back and forth by creating the following files: oh-my-zsh.zshrc
(default file installed by oh-my-zsh), grml.zshrc
(default grml zshrc), .zshrc.pre
, and .zshrc.local
.
Then if you want to use oh-my-zsh:
$ ln -s ~/oh-my-zsh.zshrc ~/.zshrc
Or, if you want to use grml:
$ ln -s ~/grml.zshrc ~/.zshrc
If you don't want to duplicate your customizations (i.e. adding files to the custom directory for oh-my-zsh and modifying the pre and local files for grml), one option is to add your customizations to .zshrc.pre
and .zshrc.local
and then source them at the bottom of your oh-my-zsh.zshrc
file like so:
source $HOME/.zshrc.pre
source $HOME/.zshrc.local
Also, if you decide to use antigen you can add it to your .zshrc.local
file and then throw a conditional around it to make sure that oh-my-zsh doesn't run it, like so:
# if not using oh-my-zsh, then load plugins with antigen
# <https://github.com/zsh-users/antigen.git>
if [[ -z $ZSH ]]; then
source $HOME/.dotfiles/zsh/antigen/antigen.zsh
antigen-lib
antigen-bundle vi-mode
antigen-bundle zsh-users/zsh-syntax-highlighting
antigen-bundle zsh-users/zsh-history-substring-search
antigen-theme blinks
antigen-apply
fi