All Projects → thiagokokada → zit

thiagokokada / zit

Licence: MIT license
minimal plugin manager for ZSH

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to zit

Ctk
A set of common support code for medical imaging, surgical navigation, and related purposes.
Stars: ✭ 498 (+1975%)
Mutual labels:  plugin-manager
Para
Para - community plugin manager and a "swiss army knife" for Terraform/Terragrunt - just 1 tool to facilitate all your workflows.
Stars: ✭ 47 (+95.83%)
Mutual labels:  plugin-manager
Sheldon
A fast, configurable, shell plugin manager
Stars: ✭ 144 (+500%)
Mutual labels:  plugin-manager
Minpac
A minimal package manager for Vim 8 (and Neovim)
Stars: ✭ 693 (+2787.5%)
Mutual labels:  plugin-manager
Plugpac.vim
Thin wrapper of minpac, provides vim-plug-like experience
Stars: ✭ 40 (+66.67%)
Mutual labels:  plugin-manager
Zsh Snap
⚡️ Znap! A fast & light-weight plugin manager & Git repo manager for Zsh.
Stars: ✭ 98 (+308.33%)
Mutual labels:  plugin-manager
Dein.vim
⚡ Dark powered Vim/Neovim plugin manager
Stars: ✭ 3,117 (+12887.5%)
Mutual labels:  plugin-manager
live-plugin-manager
Plugin manager and installer for Node.JS
Stars: ✭ 172 (+616.67%)
Mutual labels:  plugin-manager
Virtualapp
Virtual Engine for Android(Support 12.0 in business version)
Stars: ✭ 8,413 (+34954.17%)
Mutual labels:  plugin-manager
Plugin Installation Manager Tool
Plugin Manager CLI tool for Jenkins
Stars: ✭ 138 (+475%)
Mutual labels:  plugin-manager
Antigen
The plugin manager for zsh.
Stars: ✭ 6,843 (+28412.5%)
Mutual labels:  plugin-manager
Halia
Extensible TS / JS Dependency Injection Framework
Stars: ✭ 34 (+41.67%)
Mutual labels:  plugin-manager
Plug.kak
Plugin manager for Kakoune
Stars: ✭ 119 (+395.83%)
Mutual labels:  plugin-manager
Fisher
A plugin manager for Fish.
Stars: ✭ 5,386 (+22341.67%)
Mutual labels:  plugin-manager
Vim Packager
Vim plugin manager that utilizes "jobs" and "pack" features.
Stars: ✭ 197 (+720.83%)
Mutual labels:  plugin-manager
Packer.nvim
A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
Stars: ✭ 418 (+1641.67%)
Mutual labels:  plugin-manager
Ffxivapp
Visit us on Discord! https://discord.gg/aCzSANp
Stars: ✭ 82 (+241.67%)
Mutual labels:  plugin-manager
PimplePopper
Game to pop pimples using the awesome Godot Engine
Stars: ✭ 23 (-4.17%)
Mutual labels:  zit
NFive
NFive is a .NET plugin platform for FiveM
Stars: ✭ 53 (+120.83%)
Mutual labels:  plugin-manager
Zulu
Total environment manager for ZSH
Stars: ✭ 129 (+437.5%)
Mutual labels:  plugin-manager

Zit

minimal plugin manager for ZSH

This software is completed, not abandoned. More details in FAQ.

Test

Zit is yet another plugin manager for ZSH. It is minimal because it implements the bare minimum to be qualified as a plugin manager: it allows the user to install plugins from Git repositories (and Git repositories only, them why the name), source plugins and upgrade them. It does not implement fancy functions like cleanup of removed plugins, automatic compilation of installed plugins, alias for oh-my-zsh/prezto/other ZSH frameworks, building binaries, PATH manipulation and others.

It should be as simple as it can be, minimal enough that if you want you can simply copy and paste the whole Zit source to your ~/.zshrc and it would work.

Usage

The first command of Zit is install:

$ zit-install "https://github.com/Eriner/zim/" ".zim"

The command above will clone Eriner/zim inside ZIT_MODULES_PATH/.zim during the next start of your ZSH (or if you do a source ~/.zshrc). However, if ZIT_MODULES_PATH/.zim already exists, it will do nothing.

By the way, the default value of ZIT_MODULES_PATH is defined as the value of your ZDOTDIR variable or your home directory.

You can remove an installed module using remove:

$ zit-remove ".zim"

This will prompt if you really want to remove the directory ZIT_MODULES_PATH/.zim. If you answer (y)es, the removal will continue.

After install, you can load ZIM by running:

$ zit-load ".zim" "init.zsh"

zit-load also supports loading local plugins. Say I have a local plugins in ~/.local-plugin directory named local.zsh:

$ zit-load ".local-plugin" "local.zsh"

Zit also supports Git branches. To do so, pass the branch using #branch after the repository url during zit-install call:

$ zit-install "https://github.com/zsh-users/zsh-autosuggestions#develop" ".zsh-autosuggestions"

Important note: Zit does not support changing branches after install. If you want to change a branch of an already installed branch, go to the directory of the installed plugin and call git checkout branch-name manually! An alternative is to use zit-remove to remove the module without removing it from your configuration, so the module will be reinstalled in the next ZSH startup.

You can also call both zit-install and zit-load in one step:

$ zit-install-load "https://github.com/Eriner/zim/" ".zim" "init.zsh"

Finally, Zit can also upgrade all your installed plugins. For this one you simply need to run:

$ zit-upgrade

And Zit will upgrade all your plugins.

Of course, instead of typing this command at the start of your session everytime, you can simply put in your ~/.zshrc.

Aliases

Zit also provide some command alias so you can type slightly less:

Command Alias
zit-install zit-in
zit-load zit-lo
zit-install-load zit-il
zit-upgrade zit-up
zit-remove zit-rm

Installation

There are different ways to install Zit. The simplest one is to copy the file zit.zsh somewhere in your home directory and source it in your ~/.zshrc. This will always work because I want the source code of Zit to be self-contained inside this one file.

If you want to be fancy, you can also clone this repository:

$ git clone https://github.com/thiagokokada/zit.git "${HOME}/.zit"

And source the cloned diretory in your ~/.zshrc

source $HOME/.zit/zit.zsh

In the above case you could even put in your ~/.zshrc (after above line):

zit-install "https://github.com/thiagokokada/zit" ".zit"

So Zit can manage Zit upgrades too.

Supported versions

Zit supports ZSH version 5.2.0 and above. Older versions may work however they're unsupported.

For Git, version 1.9.0 and above are supported.

Examples

You can see examples of Zit utilization in zshrc.example

FAQ

Why Zit doesn't have updates? Looks like an abandoned software...

Zit is feature complete. It were developed with two objectives in mind:

  1. Being as minimal as possible, but not minimal enough that would be useless
  2. Being as correct as possible, doing what I want without trying to be smart

Both objectives have been archived so I can proudly say that Zit is a finished software. I still use Zit daily, and it covers all my use cases and, surprisingly, it is flexible enought that I still find new ways to use it.

And more important, the last bug I found in it was months ago (and it was a simple typo!).

The lack of updates doesn't mean that Zit is abandoned, though. Like I said above, I still use Zit daily, so if I (or someone) found some bug I will fix it.

Why Zit install everything in home directory by default?

Because some plugins assume that they're running from home. If this isn't a problem for you, you can simply set your ZIT_MODULES_PATH to something in your ~/.zshrc:

export ZIT_MODULES_PATH="$HOME/.zit.d"

If you set ZIT_MODULES_PATH, and there is one plugin that has hard-coded paths, you can do the following:

ZIT_MODULES_PATH="$HOME" zit-in "https://github.com/author/random" ".random"
ZIT_MODULES_PATH="$HOME" zit-lo ".random" "random.zsh"

How can I compile my ZSH plugins to speed up initialization?

The script extras/compile-zsh-files.zsh shows an example on how to compile ZSH files and plugins. You can copy it somewhere and adapt it to your needs, or you can call it directly by adding the following lines at the end of your ~/.zshrc:

zit-in "https://github.com/thiagokokada/zit" ".zit" # Skip if Zit is already installed
zit-lo ".zit" "extras/compile-zsh-files.zsh"

How can I run a bash/ksh/sh plugin?

You can simply try zit-in/zit-lo or zit-il and see if it will work. If not, you can try to run zit lo in compatibility mode:

# You can't use zit-il in this case, since we want to run only zit-lo in emulation mode.
zit-in "https://github.com/author/random-bash-plugin" "random-bash-plugin"
# You may need to avoid aliases in emulation mode
emulate bash -c 'zit-load "random-bash-plugin" "plugin.bash"'

Just remember that this may not work either since ZSH emulation is not perfect.

How can I use Zit to manage scripts like fasd?

If you want to use Zit to manage scripts that should be added to the PATH instead of using source to load, you can do the following:

zit-in "https://github.com/clvv/fasd" "fasd"
export PATH="${ZIT_MODULES_PATH}/fasd:${PATH}"

How can I disable upgrades for a specific module in Zit?

You can set ZIT_DISABLE_UPGRADE in zit-install and zit-install-load to disable upgrades for a specific module. For example:

ZIT_DISABLE_UPGRADE=1 zit-install "https://github.com/Eriner/zim/" ".zim"
ZIT_DISABLE_UPGRADE=1 zit-install-load "https://github.com/Eriner/zim/" ".zim" "init.zsh"

You can also disable ZIT_DISABLE_UPGRADE globally by calling export ZIT_DISABLE_UPGRADE=1 in your .zshrc. This may be useful if you want to only upgrade some specific modules, by unsetting ZIT_DISABLE_UPGRADE. For example:

export ZIT_DISABLE_UPGRADE=1
ZIT_DISABLE_UPGRADE= zit-install "https://github.com/Eriner/zim/" ".zim"
ZIT_DISABLE_UPGRADE= zit-install-load "https://github.com/Eriner/zim/" ".zim" "init.zsh"

How can I force a specific version of module in Zit?

Following the tip above to disable upgrades, you can be sure that one specific module will never change its version.

So lets say you want to use Eriner/zim with commit abcde, you can do something like this:

# In your .zshrc
ZIT_DISABLE_UPGRADE=1 zit-install "https://github.com/Eriner/zim/" ".zim"

# In ZSH itself
$ cd ~/.zim
$ git checkout abcde

How can I remove a module? It keeps being reinstalled after calling zit-rm!

Using zit-remove will delete the directory, however if you do not remove it from your .zshrc it will be installed again in the next ZSH startup. So do not forget to remove the call to zit-install or zit-install-load of your module.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].