Closed thalesmello closed 5 years ago
Thanks a lot for this PR. Indeed, I think this was the behavior long before conf.d was introduced. Sourcing the files in the top directory should not be needed by any plugin in use so I think it's fine if we break backward compatibility here.
This pull request does:
Preserve user defined functions and completions with higher precedence during Fundle initialization
Changes the no
init.fish
fallback behaviour to use the root folder as a functions folder rather than sourcing*.fish
Fixes tests due to breaking change
After reading about a bug in theme-bobthefish regarding fundle, I realized it happened because of two things:
Fundle was sourcing all the files in the root folder of theme-bobthefish, treating the function definitions as literal shell commands. Because of this, they always had higher precedence over functions defined in the files folder.
Fundle was prepending all the packages' function folders in the
fish_function_path
, such that plugin functions had higher precedence. This wouldn't allow an overridden user function to be correctly found by fish.After inspecting the oh-my-fish source code, I concluded the behaviour addressed the current no
init.fish
appears not to be correct, because of:init.fish
files andconf.d
folders inside packagesBecause the README of fundle said the current fallback behaviour for no
init.fish
file of sourcing*.fish
in the root directory was due to preserve compatibility with oh-my-fish plugins, and that is apparantly not oh-my-fish's actual behaviour, I figured it was supposed to be different, hence this pull request.