Skip to content

Instantly share code, notes, and snippets.

@adriaanzon
Created March 13, 2018 10:48
Show Gist options
  • Save adriaanzon/208e7651599d5234e51013b15f561a77 to your computer and use it in GitHub Desktop.
Save adriaanzon/208e7651599d5234e51013b15f561a77 to your computer and use it in GitHub Desktop.
Universal plugin manager for fish-shell

Universal plugin manager for fish-shell

There are a lot of plugin managers for fish. To name a few:

Each plugin has a folder structure that was made for use with one specific plugin manager. This little piece of code solves that by combining the locations of all plugin managers, allowing you to use any plugin without issues.

Usage

Copy the code over to your ~/.config/fish/config.fish, and git clone the plugins you want to use to ~/.local/share/fish/plugins/.

set fish_complete_path ~/.local/share/fish/plugins/*/completions $fish_complete_path
set fish_function_path ~/.local/share/fish/plugins/*/functions $fish_function_path
for plugin in ~/.local/share/fish/plugins/*
if test -f $plugin/init.fish
source $plugin/init.fish
else if test -d $plugin/conf.d
for file in $plugin/conf.d/*.fish; source $file; end
else
for file in $plugin/*.fish; source $file; end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment