antibody

package module
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2015 License: MIT Imports: 5 Imported by: 2

README

antibody Build Status Coverage Status Stories in Ready

A faster and simpler version of antigen written in Go.

"Antigen is a small set of functions that help you easily manage your shell (zsh) plugins, called bundles. The concept is pretty much the same as bundles in a typical vim+pathogen setup. Antigen is to zsh, what Vundle is to vim."

Read more: Antigen.

Why?

Antigen is really nice. But it is bloated and it is slow - 5+ seconds to load on my Mac... that's way too much to wait for a prompt to load!

I'm aware that there is other attempts, like antigen-hs, but I'm don't want to install a lot of stuff for this to work.

So, why Go, you might ask.

Well, the compiled Go program runs anywhere and doesn't depend on any shared libraries. I also don't need to source it as it would be necessary with plain simple shell. I also can do stuff in parallel with Go routines. The little amount of shell written is needed because I can't source something from inside a Go program (or at least don't yet know how to do it).

What works

These are only antigen commands I ever used:

  • bundle
  • update
  • apply

Antibody does just those three things, but you don't even need to apply. Running antibody bundle will already apply the bundle given bundle.

What doesn't work
  • Modules that are not in GitHub (you can open a PR if you wish);
  • The theme command (although some themes might just work with bundle);
  • oh-my-zsh support: it looks very ugly to me and I won't do it;
Usage
  • Download the latest release (or, if are using OSX, you can use the homebrew tap for that);
  • Uncompress it somewhere;
  • source antibody.zsh.

Attention: the antibody binary file should not be in your $PATH. You only need to source the antibody.zsh file!

Now, you can just antibody bundle stuff, e.g., antibody bundle Tarrasch/zsh-autoenv. The repository will be cloned at ~/.antibody and all .zsh.plugin files will be loaded.

If you ever need to update your bundles, just run antibody update.

Protips

Prefer to use it like this:

$ cat plugins.txt
caarlos0/jvm
djui/alias-tips
caarlos0/zsh-mkc
zsh-users/zsh-completions
caarlos0/zsh-open-github-pr
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search

$ antibody bundle < plugins.txt

This way antibody can concurrently clone the bundles, so it may be faster!

In the wild
  • I did this mostly for myself, so, my dotfiles;
Throughput Graph

Throughput Graph

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Home

func Home() string

Home finds the right home folder to use

Types

type Antibody

type Antibody struct {
	// contains filtered or unexported fields
}

Antibody wraps a list of bundles to be processed.

func New added in v0.3.1

func New(bundles []bundle.Bundle) Antibody

New creates an instance of antibody with the given bundles.

func (Antibody) Download

func (a Antibody) Download()

Download the needed bundles.

func (Antibody) Update

func (a Antibody) Update()

Update all bundles.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL