fisher/functions/__fisher_plugin_uninstall_handler.fish
Jorge Bucaran 415487dfc9
Teach uninstall handler about uninstall options.
+ Now __fisher_plugin_uninstall_handler is aware of a third argument,
`option` that can be used to indicate the event handler or uninstall
file abot any options available in `fisher uninstall`, namely, --force.

+ In addition, the uninstaller mechanism no longer receives the name of
the plugin, as this information is usually already available to plugins
anyway.

+ Finally, a path to the parent directory where the uninstall.fish file
is located is given instead of the full path to the file. Again, the
plugin usually knows the name of the file, `uninstall.fish`.
2016-02-17 13:53:24 +09:00

9 lines
232 B
Fish

function __fisher_plugin_uninstall_handler -a plugin file option
set -l path (dirname $file)
if source $file $path "$option"
emit uninstall_$plugin $path "$option"
functions -e uninstall_$plugin
end
end