mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Use fish_postexec to handle 4.1 migration automatically
This commit is contained in:
parent
285fc352b7
commit
ae423be725
1 changed files with 9 additions and 6 deletions
11
fisher.fish
11
fisher.fish
|
@ -198,10 +198,13 @@ if functions --query _fisher_self_update || test -e $__fish_config_dir/fishfile
|
||||||
_fisher_migrate >/dev/null 2>/dev/null
|
_fisher_migrate >/dev/null 2>/dev/null
|
||||||
end
|
end
|
||||||
|
|
||||||
if functions --query _fisher_list && ! set --query _fisher_4_1_migration_done
|
function _fisher_fish_postexec --on-event fish_postexec
|
||||||
set --global _fisher_4_1_migration_done
|
if functions --query _fisher_list
|
||||||
fisher update >/dev/null 2>/dev/null
|
fisher update >/dev/null 2>/dev/null
|
||||||
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
|
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
|
||||||
test -e $XDG_DATA_HOME/fisher \
|
test -e $XDG_DATA_HOME/fisher && rm -rf $XDG_DATA_HOME/fisher
|
||||||
&& echo (set_color --bold red)"fisher: XDG_DATA_HOME/fisher has been deprecated, please remove it: rm -rf $XDG_DATA_HOME/fisher"(set_color normal)
|
functions --erase _fisher_list _fisher_plugin_parse
|
||||||
|
set --erase fisher_data
|
||||||
|
end
|
||||||
|
functions --erase _fisher_fish_postexec
|
||||||
end
|
end
|
Loading…
Reference in a new issue