Coder Social home page Coder Social logo

reel's Introduction

reel

MIT License

reel

The simple, elegant, clutter-free fish plugin manager that shows you maybe don't even really need one

Installation

TLDR; Just grab Reel with a simple git command and copy a file to your fish config.

set reel_plugin_dir $__fish_config_dir/plugins
git clone --depth 1 https://github.com/mattmc3/reel $reel_plugin_dir/reel
cp $reel_plugin_dir/reel/templates/reel.fish $__fish_config_dir/conf.d

Introduction

Other plugin managers do too much magic, require extra variables or configuration files, and can clutter up your personal fish config.

Reel doesn't do any of that. It doesn't need to. It offers a much simpler way to think about managing your fish shell plugins. The power of Reel is that it's a plugin manager that shows that maybe you don't really even need a plugin manager. Or at least not a very fancy one. Let me show you what I mean.

The way Reel works is that it stores any plugins you clone from git in the ~/.config/fish/plugins folder. It then uses fish's built-in $fish_function_path and $fish_complete_path to tell fish where to find the plugin's key files. This short snippet from Reel is the entirety of what you'd need to load your own plugins without using a "plugin manager".

function load_plugin -a plugin
    if test -d "$plugin/completions"; and not contains "$plugin/completions" $fish_complete_path
        set fish_complete_path "$plugin/completions" $fish_complete_path
    end
    if test -d "$plugin/functions"; and not contains "$plugin/functions" $fish_function_path
        set fish_function_path "$plugin/functions" $fish_function_path
    end
    for f in "$plugin/conf.d"/*.fish
        builtin source "$f"
    end
end

With this tiny snippet of code and a basic knowledge of git commands, you could git by without a Fish plugin manager. Imagine that. A tool so confident in itself that is shows you that you don't even need it. But, Reel puts some extra goodies on top of this simple concept. So if you want those goodies, then Reel might be right for you.

The Goodies

List your plugins:

reel ls

Initialize a plugin. Initializing means that the plugin will git clone if it's not found before trying to load it:

reel in mattmc3/reel

Load a plugin without trying to clone it first.

reel load myplugin

Load a plugin from some location on your computer. Loaded plugins don't even have to come from git repos.

reel load ~/.config/fish/my_fancy_plugin

Update all your plugins:

reel up

Update a specific plugin:

reel up reel

Or, use the user/repo name

reel up mattmc3/reel

Remove a plugin:

reel rm jorgebucaran/fisher

Clone a plugin without loading it. github.com is the assumed home of the plugin:

reel clone laughedelic/fish_logo

Clone a plugin from someplace other than github.com:

reel clone [email protected]:my_username/my_fish_plugin.git
reel clone https://bitbucket.org/my_other_username/my_other_fish_plugin.git

Customization

Don't care for github.com and want reel to always favor using another server as the default git domain? Set the $reel_git_default_domain variable at the top of your ~/.config/fish/conf.d/reel.fish file.

set -gx reel_git_default_domain "bitbucket.org"
# or...
set -gx reel_git_default_domain "gitlab.com"

reel's People

Contributors

hugoh avatar mattmc3 avatar

Watchers

 avatar  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.