I cannot tell from the docs how one would go about developing a plugin or theme locally. More info would be appreciated.
@milkypostman You are right, the README only explains how to use fisherman. A tutorial would serve this project more. 馃憤
Developing a plugin (same applies to themes, a.k.a prompts) locally
$ mkdir -p path/to/my_plugin
cat here only for terseness) $ cat > path/to/my_plugin/my_plugin.fish
function my_plugin
echo "hello, world"
end
$ fisher path/to/my_plugin
Installing path/to/my_plugin
$ my_plugin
hello, world

One more thing, when you run fisher ls now, local plugins will be prepended with a @ in the listing.
I have a related question:
I'm starting fresh with Fisherman, and I'm wondering which files should I track with git. I know I should track the fishfile, but what about my custom functions, completions, and etc. Placing them at the completions/ and functions/ directories under ~/.config/fish/ doesn't seem a good idea, since they are full of Fisherman's stuff.
One idea is to make everything a fisherman plugin, and placing them at ~/.config/fish/fisher_plugins/. That way it seems easier to track.
Any input is appreciated.
@iquabius This question does not have a clear-cut answer, but I can tell you how I do it.
Make your custom functions, themes and snippets into plugins. You can then publish and share them with everyone else.
If sharing is not an option, turn them into _local_ plugins (follow the steps above), and like you suggested, create a directory somewhere, say ~/Code/fish and put them plugins in there.
Now, it's up to you to decide whether to wrap all those functions into a single plugin (not efficient), or create a plugin per function (best approach that taps into fish-shell's lazy loading mechanism).
One more thing. What if you want to keep some of those plugins private, but still need an option to publish over the network? You can use a private git URL for that, but to make it all simple, fisherman supports installing from gists too.
I hope this helps.
It sure helps. Thank you!
@milkypostman There's still no "official" guide to develop plugins locally, other than what I posted there above, but we'll get there soon. In the meantime, I've been working on a cookbook for fish. Perhaps you'll find that useful.
closing as question has been anwered.
@jbucaran I created a wiki pages from your post Developing a plugin or themes locally.
Thanks @edouard-lopez! 馃檹
Most helpful comment
@milkypostman You are right, the README only explains how to use fisherman. A tutorial would serve this project more. 馃憤
Developing a plugin (same applies to themes, a.k.a prompts) locally
cathere only for terseness)