Closed jorgebucaran closed 3 years ago
Hi @jorgebucaran. I got a warning about https://github.com/oh-my-fish/plugin-pyenv and https://github.com/oh-my-fish/plugin-cd not being supported anymore. I guess it's because of the init.fish
files, right? Is it enough to just move them to conf.d/
or somewhere else? What about uninstall.fish
in plugin-cd
?
To modernize an Oh My Fish! plugin:
init.fish
to conf.d/plugin_name.fish
./*.fish
to functions
.uninstall.fish
. Use event system instead.I don't know if you have thought about it but how about script (.fish) files that you don't want to pack to users like testing or automation intended ones? How do we tell Fisher about it? Is not suitable to just skip "top-level" script files?
Those are some concerns since newer Fisher shows fisher: Plugin not supported:
during installations that contains .fish script files outside Fish dirs.
When installing plugins, in addition to .fish
files, we also copy any files and directories inside your plugin functions/
, conf.d/
, and completions/
to $fisher_path under functions/
, conf.d
, and completions
respectively, allowing you to access these resources easily (#581).
You can also place .fish
files in directories in the top-level, for example, I put Fisher tests in tests/
.
I put Fisher tests in
tests/
.
I did the same and now no more messages but my question is more about what do we need to care about "top-level" script files? Can Fisher just skip them since Fish dirs are well known.
Fisher ignores top-level .fish
files. I think the error message is confusing and makes people mistakenly think Fisher won't install the plugin. I am just going to remove the warning in the next minor bump (#666). 🤘
Functions to
functions/
. Completions tocompletions/
. Shell startup snippets toconf.d/
. That leaves top-level.fish
files out of place. Very much in line with Python's "there should be one—and preferably only one—obvious way to do it", and Fish's law of orthogonality, I want to drop support for top-level.fish
files on principle.I'm thinking of doing this in the following steps:
fisher.fish
tofunctions/fisher.fish
.4.x
upgrade guide (#652). Because we'll break old Fisher installations.If a plugin suddenly stops working, nicely ask the maintainers to modernize it, or even better, send them a PR moving all top-level
.fish
files into thefunctions
directory.