mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-07 13:41:21 +00:00
#364 Make aliases cache persistent
This commit is contained in:
parent
f3525e9fe0
commit
7339a97b90
@ -187,7 +187,7 @@ def cache(*depends_on):
|
|||||||
if cache.disabled:
|
if cache.disabled:
|
||||||
return fn(*args, **kwargs)
|
return fn(*args, **kwargs)
|
||||||
|
|
||||||
cache_path = os.path.join(tempfile.gettempdir(), '.thefuck-cache')
|
cache_path = settings.user_dir.joinpath('.thefuck-cache').as_posix()
|
||||||
# A bit obscure, but simplest way to generate unique key for
|
# A bit obscure, but simplest way to generate unique key for
|
||||||
# functions and methods in python 2 and 3:
|
# functions and methods in python 2 and 3:
|
||||||
key = '{}.{}'.format(fn.__module__, repr(fn).split('at')[0])
|
key = '{}.{}'.format(fn.__module__, repr(fn).split('at')[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user