2015-08-27 18:55:29 +00:00
|
|
|
function omf.destroy -d "Remove Oh My Fish"
|
2015-08-26 15:20:13 +00:00
|
|
|
echo (omf::dim)"Removing Oh My Fish..."(omf::off)
|
|
|
|
|
2015-09-12 21:50:22 +00:00
|
|
|
for pkg in (basename $OMF_PATH/pkg/*)
|
|
|
|
omf.remove_package $pkg >/dev/null ^&1
|
|
|
|
end
|
2015-08-26 15:20:13 +00:00
|
|
|
|
2015-09-17 20:41:56 +00:00
|
|
|
set -l fish_config $XDG_CONFIG_HOME/fish
|
|
|
|
if test "$fish_config" = "/fish"
|
|
|
|
set fish_config $HOME/.config/fish
|
|
|
|
end
|
|
|
|
|
|
|
|
set -l localbackup (find $fish_config -regextype posix-extended -regex '^.*fish/config\.[[:digit:]]+\.copy$' |\
|
|
|
|
sort -r |head -1)
|
|
|
|
if test -n $localbackup
|
|
|
|
mv $localbackup "$fish_config/config.fish"
|
2015-08-26 15:20:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if test "$OMF_PATH" != "$HOME"
|
|
|
|
rm -rf "$OMF_PATH"
|
|
|
|
end
|
|
|
|
|
|
|
|
exec fish < /dev/tty
|
|
|
|
end
|