Theory-of-Everything / snag

a simple and minimal zsh "plugin" manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sang

Snag is an ultra-simple and minimal "plugin manager" for zsh.

Usage:

To install "plugins"

# .zshrc
# all plugins are cloned to $ZDOTDIR/plug
# in the pattern user/repo
snag-use "zsh-users/zsh-syntax-highlighting"
snag-use "hlissner/zsh-autopair"

# to use plugins with script names not similar to the repo name,
# pass in a second argument of the filename relative path without '.plugin.zsh'/'.zsh' file extension
snag-use "ael-code/zsh-colored-man-pages" "colored-man-pages"

Command line options:

snag [OPTIONS] [PLUG]
  -u PLUG			install plugin from repo user/repo
  -r PLUG			remove installed plugin user/repo
  -D				purge all installed plugins
  -s				update installed plugins

  -l				list all plugins
  -i PLUG			get info on a plugin to stdout or pager if set

  -h, --help			print help dialouge
  -v, --version			print current snag version

For more detailed documentation:

man snag

Installation:

mkdir $ZDOTDIR/plug
git clone https://git.sr.ht/~theorytoe/snag/blob/main/snag.zsh
cd snag
make install

Source it in your .zshrc:

# .zshrc

# by default snag is installed here
# if you install it somewhere else change accordingly
source "~/.local/share/bin/snag"

To install only man pages:

make man

To uninstall:

cd /path/to/snag/repo
make uninstall

manual method

rm -f ~/.local/share/bin/snag
rm -f ~/.local/share/man/man1/snag.1.gz

Contributing:

If you want to contibute, file issues in the tracker and send patches to the mailing list

Notes:

This tool relies on having your $ZDOTDIR evironment variable set, and will not function properly if not set.

About

a simple and minimal zsh "plugin" manager

License:GNU General Public License v3.0


Languages

Language:Shell 56.6%Language:Roff 31.9%Language:Makefile 11.5%