mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
ebec1eaa01
* Deprecate fisher --list in favor of a new command fisher list. The behavior is roughly the same. See fisher help list for usage. tl;dr: Use list to query the local system / cache and search to query the index. * Teach fisher_plugin_walk about fish_postexec, fish_command_not_found and fish_preexec event emitters and erase them during uninstall if they were defined in a snippet. * Fisherman now recognizes the following aliases by default: i for install, u for update, l for list, s for search and h for help. * Large documentation rewrite. Better, simpler, more concise and more consistent. * Fisherman now detects if users have modified their fish prompt using fish_config and if so, uninstalls $fisher_prompt.
31 lines
986 B
Fish
31 lines
986 B
Fish
function __fisher_plugin_disable -a plugin path option
|
|
__fisher_plugin_walk "$plugin" "$path" | while read -l class source target name
|
|
switch "$class"
|
|
case --bind
|
|
debug "Disable key bindings '%s'" $plugin
|
|
|
|
__fisher_key_bindings_disable $plugin (__fisher_xdg --config
|
|
)/fish/functions/fish_user_key_bindings.fish
|
|
|
|
case --uninstall
|
|
__fisher_plugin_uninstall_handler $plugin $source "$option"
|
|
|
|
case \*
|
|
__fisher_plugin_unlink $fisher_config/$target $name
|
|
end
|
|
end
|
|
|
|
if __fisher_path_is_prompt $path
|
|
__fisher_prompt_reset
|
|
end
|
|
|
|
if test -s $fisher_file
|
|
debug "Remove from fishfile %s" "$plugin"
|
|
|
|
__fisher_file_remove (
|
|
if not fisher_search --name=$plugin --name --index=$fisher_cache/.index
|
|
__fisher_url_from_path $path
|
|
end
|
|
) $fisher_file > /dev/null
|
|
end
|
|
end
|