19

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?

2

1 Answer 1

19

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:

grml-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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .