mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-09 07:10:27 +00:00
415487dfc9
+ 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`.
9 lines
232 B
Fish
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
|