Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

NPM packages come to Zsh world via Zplugin support



I would like to announce that Zplugin supports NPM-packages that are
targetted as a Zsh package, i.e.: if they contain a specific meta-data
in the package.json.

Why do this?

1. Zplugin is a very flexible plugin manager however users often feel
overwhelmed by its configuration.

2. It has many package-manager -like features, such as: it can run
Makefiles, automatically provide shims (i.e.: forwarder scripts) for
the binaries, extend $PATH to expose the binaries, and more.

3. So a solution came up: why not register a package at the
NPM-registry with the plugin-configurations (i.e.: ice-mods) stored in
the package.json file?

This way, instead of the following command used to install `fzf':

zplugin lucid as=program \
    pick="$ZPFX/bin/(fzf|fzf-tmux)" \
    atclone="cp shell/completion.zsh _fzf_completion; \
       cp bin/fzf-tmux $ZPFX/bin" \
    make="PREFIX=$ZPFX install" for \
          junegunn/fzf

you only need:

    zplugin pack for fzf

to get the complete setup of the fuzzy finder, including the
completion and the additional script `fzf-tmux'. The installation is
real, package-manager -like, because you don't need to invoke Zplugin
anymore once installed to use fzf, and you can update the package with
`zplugin update fzf', it'll cause the project to refresh and rebuild.

There are currently 4 packages available, their home is the
Zsh-Packages[1] GitHub organization. I'll be adding the packages
intensively over the next days so you can expect it to grow fast.
Also, anyone interested in owning a repository in the organization is
welcomed, so are requests for a specific package to be included.

Also, it would be great if someone graphically skilled would come up
with a logo for the organization.

1: https://github.com/zsh-packages

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author