From add499af7f344421083cb8a910c44785e20d5b57 Mon Sep 17 00:00:00 2001 From: nvbn Date: Sun, 7 Jun 2015 02:23:48 +0300 Subject: [PATCH] #250 #247 Fix UnicodeDecodeError with fish --- thefuck/shells.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thefuck/shells.py b/thefuck/shells.py index 9701816..6bfc84d 100644 --- a/thefuck/shells.py +++ b/thefuck/shells.py @@ -49,7 +49,7 @@ class Generic(object): history.write(self._get_history_line(command_script)) def and_(self, *commands): - return ' && '.join(commands) + return u' && '.join(commands) class Bash(Generic): @@ -105,7 +105,7 @@ class Fish(Generic): aliases = self.get_aliases() binary = command_script.split(' ')[0] if binary in aliases: - return 'fish -ic "{}"'.format(command_script.replace('"', r'\"')).encode('utf8') + return u'fish -ic "{}"'.format(command_script.replace('"', r'\"')) else: return command_script @@ -120,7 +120,7 @@ class Fish(Generic): return u'- cmd: {}\n when: {}\n'.format(command_script, int(time())) def and_(self, *commands): - return '; and '.join(commands) + return u'; and '.join(commands) class Zsh(Generic):