Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yarden-zamir/gh-source
A plugin manager for people who don't like plugin managers
https://github.com/yarden-zamir/gh-source
brew dotfiles mac package-manager script zsh
Last synced: about 1 month ago
JSON representation
A plugin manager for people who don't like plugin managers
- Host: GitHub
- URL: https://github.com/yarden-zamir/gh-source
- Owner: Yarden-zamir
- License: mit
- Created: 2023-03-25T10:13:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-06T05:16:07.000Z (5 months ago)
- Last Synced: 2024-12-09T00:36:57.883Z (about 1 month ago)
- Topics: brew, dotfiles, mac, package-manager, script, zsh
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# gh-source
This is a plugin manager for people who don't like plugin managers. It's a simple shell function that downloads and installs plugins from GitHub as part of the sourcing step. It's designed to be used with [zsh](http://www.zsh.org/), but it should work with any shell.## Installation
in the terminal
either clone this repo
```sh
git clone https://github.com/yarden-zamir/gh-source.git
```
or use a package manager
```sh
brew install yarden-zamir/tap/gh-source
```
then in your `.zshrc`
```sh
source gh-source.zsh
```
(This is the last time you need to clone shell stuff manually)
## Problem domains / needs
1. Fast
2. Simple
3. Configuring/installing plugins in one location
4. Updating plugins
5. Opinionated - because all of my plugins are hosted on github, I can rely on that to make things easier and faster
6. Customizable## Before / After
As someone who didn't like all the stuff that comes with all the popular pluigin managers and hated how most don't even ofer proper updating system. I usually did the following---
in the terminal
```sh
git clone https://github.com/hlissner/zsh-autopair.git
```
then in my `.zshrc`
```sh
source ~/github/zsh-autopair/autopair.zsh
```
---
using gh-source, I don't need to run anything ahead of time, just add this line to my `.zshrc`
```sh
gh_source hlissner/zsh-autopair/autopair.zsh
```
and it will download and source the plugin for me.This is useful for sharing dotfiles, because I don't need to share an instruction manual for what to clone before hand or a seperate script. Better yet it lets me update all my plugins easily with `gh_source --update`
## Help
```sh
Usage: prog [options] [plugin] [install_command] [install_location]
Examples:
gh-source owner/repo/script.zsh
gh-source owner/repo 'source {}/script.zsh && echo potato'
gh-source owner/repo 'source {}/script.zsh && echo potato' /home/user/special_location
gh-source --update
Options:
--help: print this help message
--update: update all plugins
--list: list all plugins
Arguments:
plugin: the plugin to source. If no install_command is passed, it will assume the last segment is the file to source (default install command)
install_command: the command to run to install the plugin (default: 'source {}/$(echo "$1" | cut -d'/' -f3-) where {} is replaced by install location. meaning that if your plugin is owner/repo/plug.zsh, it will run 'source $install_location/plug.zsh
install_location: the location to install the plugin to (default: $GH_SOURCE_INSTALL_LOCATION/$(basename $install_source))
```https://github.com/Yarden-zamir/gh-source/assets/8178413/a4c58620-74fe-4f37-8cb1-4c1ad9ff2428