zgen icon indicating copy to clipboard operation
zgen copied to clipboard

Implement 2 paragraphs (1st and 5th) of the plugin standard

Open psprint opened this issue 5 years ago • 2 comments

I thought that I'll implement some of the paragraphs of the plugin standard. The PR implements paragraph 1 and 5:

  1. Provide the $ZERO parameter – a sister parameter to the $0.
  2. Provide the $zsh_loaded_plugins array.

The details are on the link. The PR doesn't cover Prezto modules, however they don't rely on $ZERO and $zsh_loaded_plugins parameters. The standard has some adoption now, e.g.: GitHub search. Most of the plugins are mine, however c.a. 50% are other authors.

Example init.zsh generated:

# {{{
# Generated by zgen.
# This file will be overwritten the next time you run zgen save!

ZSH=/root/.zgen/robbyrussell/oh-my-zsh-master

# ### General modules
typeset -ga zsh_loaded_plugins

# zdharma/zconvey
zsh_loaded_plugins+=( "zdharma/zconvey" )
ZERO="/root/.zgen/zdharma/zconvey-master/zconvey.plugin.zsh"
source "/root/.zgen/zdharma/zconvey-master/zconvey.plugin.zsh"

# fast-syntax-highlighting
zsh_loaded_plugins+=( "/fast-syntax-highlighting" )
ZERO="/root/my-plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
source "/root/my-plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"

# robbyrussell/oh-my-zsh/oh-my-zsh.sh
zsh_loaded_plugins+=( "robbyrussell/oh-my-zsh/oh-my-zsh.sh" )
ZERO="/root/.zgen/robbyrussell/oh-my-zsh-master/oh-my-zsh.sh"
source "/root/.zgen/robbyrussell/oh-my-zsh-master/oh-my-zsh.sh"

# robbyrussell/oh-my-zsh/lib/git.zsh
zsh_loaded_plugins+=( "robbyrussell/oh-my-zsh/lib/git.zsh" )
ZERO="/root/.zgen/robbyrussell/oh-my-zsh-master/lib/git.zsh"
source "/root/.zgen/robbyrussell/oh-my-zsh-master/lib/git.zsh"

# robbyrussell/oh-my-zsh/plugins/git
zsh_loaded_plugins+=( "robbyrussell/oh-my-zsh/plugins/git" )
ZERO="/root/.zgen/robbyrussell/oh-my-zsh-master/plugins/git/git.plugin.zsh"
source "/root/.zgen/robbyrussell/oh-my-zsh-master/plugins/git/git.plugin.zsh"
unset ZERO

# ### Plugins & Completions
fpath=(/root/my-plugins/fast-syntax-highlighting /root/.zgen/zdharma/zconvey-master /root/.zgen/robbyrussell/oh-my-zsh-master/plugins/git /root/.zgen/robbyrussell/oh-my-zsh-master/lib ${fpath})

# }}}

psprint avatar Oct 24 '19 23:10 psprint

this is awesome.

jubishop avatar Oct 27 '19 03:10 jubishop

Hi. Any update on this? I could revise the PR and thoroughly test it once more if it has any chance of merging.

psprint avatar Jan 30 '20 12:01 psprint