Commit 520d5979 authored by Bruno Pinto's avatar Bruno Pinto

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.
parent b4aa5a44
...@@ -15,7 +15,7 @@ function omf.remove_package ...@@ -15,7 +15,7 @@ function omf.remove_package
for path in {$OMF_PATH,$OMF_CONFIG}/{pkg}/$pkg for path in {$OMF_PATH,$OMF_CONFIG}/{pkg}/$pkg
not test -d $path; and continue not test -d $path; and continue
emit uninstall_$pkg source $path/uninstall.fish; and emit uninstall_$pkg
omf.bundle.remove "package" $pkg omf.bundle.remove "package" $pkg
rm -rf $path rm -rf $path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment