1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00

#N/A: Show deprecation warning when ~/.thefuck used

This commit is contained in:
Vladimir Iakovlev 2016-08-14 20:02:33 +03:00
parent 71025dff17
commit 070bb2ff28

View File

@ -1,6 +1,7 @@
from imp import load_source
import os
import sys
from warnings import warn
from six import text_type
from . import const
from .system import Path
@ -43,6 +44,8 @@ class Settings(dict):
legacy_user_dir = Path('~/.thefuck').expanduser()
if legacy_user_dir.is_dir():
warn('~/.thefuck is deprecated, please move '
'config to ~/.config/thefuck')
return legacy_user_dir
else:
xdg_config_dir = os.getenv("XDG_CONFIG_HOME", "~/.config")