pub fn install_plugin(url: &str)Expand description
Install a plugin from its github repository. It can also be used to update a plugin if its repository was updated.
§Usage
fmconfig plugin install qkzk/bat_previewer
§Steps
It will successively perform:
- parse the author and plugin name from
author_plugin, spliting it at the first / - build the repository address which is a temporary folder located at
crate::common::REPOSITORIES_PATH - clone the repository in the temporary folder
- build the release libso file of the plugin
- copy the libso file to its destination
crate::common::PLUGIN_LIBSO_PATHand check the result of compilation - add the plugin to the config file in
crate::common::CONFIG_PATH - remove the repository folder from temporary files
§Failure
If any step fails (except adding the plugin to config file), it exits with an error printed to stderr.