diff --git a/thefuck/shells/fish.py b/thefuck/shells/fish.py index f0a1f4f3..538828d7 100644 --- a/thefuck/shells/fish.py +++ b/thefuck/shells/fish.py @@ -36,7 +36,7 @@ class Fish(Generic): 'end').format(alias_name, alter_history) @memoize - @cache('.config/fish/config.fish', '.config/fish/functions') + @cache('~/.config/fish/config.fish', '~/.config/fish/functions') def get_aliases(self): overridden = self._get_overridden_aliases() proc = Popen(['fish', '-ic', 'functions'], stdout=PIPE, stderr=DEVNULL) diff --git a/thefuck/utils.py b/thefuck/utils.py index ae56b963..60bc2f5c 100644 --- a/thefuck/utils.py +++ b/thefuck/utils.py @@ -208,7 +208,7 @@ def cache(*depends_on): """ def _get_mtime(name): - path = os.path.join(os.path.expanduser('~'), name) + path = Path(name).expanduser().absolute().as_posix() try: return str(os.path.getmtime(path)) except OSError: