Zsh: Difference between revisions

YoshiRulz (talk | contribs)
m How to use plugins?: Fix syntax error
Likivik (talk | contribs)
m How to use plugins?: 1) Added links for plugin managers 2) Added Antidote to plugin managers and code example
Line 41: Line 41:


==== Where to see a list of options? ====
==== Where to see a list of options? ====
The home manager options are defined in the following [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.zsh.enable Home Manager Options Manual].
The home manager options are defined in the following [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.zsh.enable Home Manager Options Manual] or can be looked up at [https://home-manager-options.extranix.com/?query=zsh&release=master Home Manager Option Search].


The system-wide options are listed on [https://mynixos.com/search?q=zsh MyNixOS].
The system-wide options are listed on [https://mynixos.com/search?q=zsh MyNixOS].


==== How to use plugins? ====
==== How to use plugins? ====
Home manager has three ways of managing plugins: '''Zplug''', '''Oh-My-Zsh''' and '''Manual'''.<syntaxhighlight lang="nix">
Home manager has four ways of managing plugins: '''[http://zplug.github.io/ Zplug]''', '''[https://ohmyz.sh/ Oh-My-Zsh], [https://getantidote.github.io/ Antidote]''' and '''Manual'''.<syntaxhighlight lang="nix">
programs.zsh = {
programs.zsh = {
   enable = true;
   enable = true;


# With Zplug:
   zplug = {
   zplug = {
     enable = true;
     enable = true;
Line 61: Line 62:
   };
   };


# With Oh-My-Zsh:
   ohMyZsh = {
   ohMyZsh = {
     enable = true;
     enable = true;
Line 67: Line 69:
   };
   };


# With Antidote:
  antidote = {
    enable = true;
    plugins = [''
      zsh-users/zsh-autosuggestions
      ohmyzsh/ohmyzsh path:lib/git.zsh
    '']; # explanation of "path:..." and other options explained in Antidote README.
# Manual
   plugins = [
   plugins = [
     {
     {