mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
96b4522f84
* 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.
28 lines
829 B
Fish
28 lines
829 B
Fish
function fish_config -d "Launch fish's web based configuration" -a tab
|
|
set -l config ~/.config
|
|
|
|
if set -q XDG_CONFIG_HOME
|
|
set config $XDG_CONFIG_HOME
|
|
end
|
|
|
|
set -l file $config/fish/functions/fish_prompt.fish
|
|
set -l sum_before (cksum $file ^ /dev/null | awk '{ print $1 + $2 }')
|
|
|
|
debug "fish_config start"
|
|
|
|
eval $__fish_datadir/tools/web_config/webconfig.py $tab
|
|
|
|
debug "fish_config end"
|
|
|
|
if test ! -z "$fisher_prompt"
|
|
set -l sum_after (cksum $file ^ /dev/null | awk '{ print $1 + $2 }')
|
|
|
|
debug "fish_prompt check sum before: %s" $sum_before
|
|
debug "fish_prompt check sum after: %s" $sum_after
|
|
|
|
if test "$sum_before" != "$sum_after"
|
|
debug "Uninstall %s" "$fisher_prompt"
|
|
fisher_uninstall "$fisher_prompt" -q
|
|
end
|
|
end
|
|
end
|