From 4fc18cb4e7d3a7b3e39d1ba7ddf8957190314c5a Mon Sep 17 00:00:00 2001 From: nvbn Date: Tue, 28 Jul 2015 16:26:26 +0300 Subject: [PATCH] Decrease count of psutils calls --- thefuck/shells.py | 1 + 1 file changed, 1 insertion(+) diff --git a/thefuck/shells.py b/thefuck/shells.py index d5fac6e3..6c7a7baa 100644 --- a/thefuck/shells.py +++ b/thefuck/shells.py @@ -224,6 +224,7 @@ shells = defaultdict(lambda: Generic(), { 'tcsh': Tcsh()}) +@memoize def _get_shell(): try: shell = Process(os.getpid()).parent().name()