Source uninstall.fish file before emitting event

Instead of having every plugin function inside the same file, which
increases the loading time unnecessarily and is not fishy, source the
`uninstall.fish` file for the plugin before the `uninstall_$plugin_name`
event is emitted.
This commit is contained in:
Bruno Pinto 2015-10-03 22:11:49 +01:00
parent b4aa5a4408
commit 520d597947

View File

@ -15,7 +15,7 @@ function omf.remove_package
for path in {$OMF_PATH,$OMF_CONFIG}/{pkg}/$pkg
not test -d $path; and continue
emit uninstall_$pkg
source $path/uninstall.fish; and emit uninstall_$pkg
omf.bundle.remove "package" $pkg
rm -rf $path