GithubHelp home page GithubHelp logo

zap's Introduction

zap_logo


Latest release Last commit License Stars Issues Repo Size Patreon donate button follow on Twitter

⚡ Zap is a minimal zsh plugin manager

Prerequisites

  • ZSH
  • a nerd font (optional)

To get your nerd font check out getNF project or visit NerdFonts site.

Install

zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh) --branch release-v1

Zap works on Linux, macOS, Windows (within WSL), Android (within Termux)

Example usage

Add the following to your .zshrc

# Example install of plugins
plug "zap-zsh/supercharge"
plug "zsh-users/zsh-autosuggestions"

# Example install of a plugin pinned to specifc commit or branch, just pass the git reference
plug "zsh-users/zsh-syntax-highlighting" "122dc46"

# Example install of a theme
plug "zap-zsh/zap-prompt"

# Example install of a zsh completion
plug "esc/conda-zsh-completion"

You can also use Zap to install custom plugins or source custom files present on your local filesystem. A file descriptor which points to a directory is treated as a plugin, versus a regular file. For example:

# Example install of a local plugin
plug "$HOME/plugins/my-custom-prompt"

# Example sourcing of local files
plug "$HOME/.config/zsh/aliases.zsh"
plug "$HOME/.config/zsh/exports.zsh"

By default Zap when installing a plugin will clone a GitHub repository using a HTTPS web URL, if you require to be able to install from a private GitHub or from a different git server (for example GitLab) you can provide a different URL prefix to be used. For example:

# Example globally setting the prefix for Zap to git clone using an SSH key
export ZAP_GIT_PREFIX="[email protected]:"
plug "zap-zsh/private-repo"

# Example git clone using GitLab for a single plugin
ZAP_GIT_PREFIX="https://gitlab.com/" plug "user/repo"

It is possible to call plug in any interactive shell session to source a file or to download and source a plugin for that particular session.

⚠️ If you call plug outside your .zshrc file, the plugin you sourced will not be sourced at the next shell reload.

Commands

Zap provided commands for updating and cleaning up plugins

  • To update plugins or Zap:

    zap update self # Update the Zap installation
    zap update plugins # Update all your plugins but not Zap
    zap update all # Update both the Zap installation and its plugins
  • To list all plugins you are using:

    zap list
  • To remove plugins you are no longer using:

    zap clean

Uninstall

To uninstall Zap, when currently active, execute the following:

rm -rf "$ZAP_DIR"

When not currently active, execute the following:

rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zap"

Notes

For sourcing local files use $HOME instead of ~ when giving a full path to the file.


zap thumbnail

Socials

Github Logo Discord Logo Twitter Logo Reddit Logo

Thanks to all contributors

zap's People

Contributors

5c077m4n avatar abrahamparayil avatar andrew15-5 avatar antpeixe avatar chrishrb avatar christianchiarulli avatar cobalt-inferno avatar codehia avatar dotzenith avatar dtomvan avatar erkattak avatar granddave avatar itznesbrodev avatar loneexile avatar mamaraddio avatar mattmc3 avatar pheon-dev avatar rishabh672003 avatar trimclain avatar umop3plsdn avatar undg avatar wintermi avatar

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.