Coder Social home page Coder Social logo

zpm-zsh's Introduction

zpm - Zsh Plugin Manager ![Gitter](https://badges.gitter.im/Join Chat.svg) Build Status

zsh plugin manager in ansi C.

Installation

Clone this repository and then:

make

You'll have a zpm binary in the current directory, copy it to /usr/local/bin.

Usage

Installing plugins

You first will need to install the plugins you want:

zpm "zsh-users/zsh-syntax-highlighting"
zpm "zsh-users/zsh-autosuggestions"
zpm "rupa/z"

These commands will generate $HOME/.zpm-init.zsh file. Use that to load plugins.

Configure zsh

Then configure zsh to use them:

# .zshrc
source $HOME/.zpm-init.zsh

If you add or remove new plugins you will need to:

zpm reset

Commands

To see a list of installed plugins:

zpm list

To update installed plugins:

zpm update

To persist your current configuration to be able to commit it into a dotfile repository:

zpm save

Example:

zpm save > ~/dotfiles/.zpmrc

Next time you'll only need to install them like so:

source ~/dotfiles/.zpmrc

To reset your plugin configuration:

zpm reset

To disable a plugin from loading:

zpm disable "plugin/name"

To disable and remove a plugin from disk:

zpm remove "plugin/name"

Development

Running tests:

make test

You'll need zcram (or cram) installed and available in PATH.

Maintainers

zpm is currently being actively developed by @desyncr and @fennecdjay.

TODO

  • Update command
  • Add plugins to fpath
  • Support for local plugins
  • List command show version (hash)
  • Add executables to PATH

zpm-zsh's People

Contributors

desyncr avatar fennecdjay avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

zpm-project

zpm-zsh's Issues

Support repository hosts other than github

Allow for custom hosts/repository urls. For now use github.com by default, but allow for other hosts:

zpm "gitlab.com/repository/name"
zpm "bitbucket.com/user/plugin"

Review multi-host support

  • Review implementation to be fully host agnostic (github, bitbucket, etc)
  • Avoid hardcoding hosts (try to...)
  • Add tests

@fennecdjay I have yet no idea how to implement this so any suggestion is welcome!

We should discuss here before doing any PR :)

Support local plugins

zpm should be able to install plugins from local path as well as github urls:

zpm "/path/to/local/plugin"   # /path/to/local/plugin
zpm "remote/plugin"           # github.com/remote/plugin.git

Add compinit autoload

This should be done in $HOME/.zpm-init.zsh:

autoload -Uz compinit
compinit -iCd $HOME/.zcompdump

'usage' does not reflect current state.

for now, it just prints:

Usage:
  zpm 'zsh-users/zsh-syntax-highlighting'

but I think it could add:

  zpm reset
  zpm list
  zpm update

What do you think? am I forgetting something?
I can do it and submit a pull request if you like.

Update fpath and/or PATH

Generated ~/.zpm-init.zsh should add entries to fpath and/or PATH. This is necessary for plugins installing functions to fpath or executables to PATH. Example:

~/.zpm-init.zsh:

fpath+=(/path/to/plugin /path/to/other/plugin)

double entry for github/host

./zpm zsh-users/zsh-syntax-highlighting
./zpm github.com/zsh-users/zsh-syntax-highlighting
cat ~/.zpm-init.zsh
source /home/djay/.zpm/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fpath+=/home/djay/.zpm/plugins/zsh-users/zsh-syntax-highlighting/
autoload -Uz compinit; compinit -iCd $HOME/.zcompdump
cat ~/.zpm/.plugin_list
zsh-users/zsh-syntax-highlighting
github.com/zsh-users/zsh-syntax-highlighting

while ~/.zpm-init.zsh is correct, it appears that ~/.zpm/.plugin_list incorrectly reports two entries.

see #18.

Avoid installing plugin twice

If a user tries to install a plugin twice we should

  1. warn the user the plugin in already installed
  2. return immediately

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.