From ca44ee064056642fa62ec15753c825b856c8e932 Mon Sep 17 00:00:00 2001 From: Joseph Frazier <1212jtraceur@gmail.com> Date: Fri, 18 Nov 2016 14:03:28 -0500 Subject: [PATCH] bash: use bashlex for split_command, not shlex --- setup.py | 2 +- thefuck/shells/bash.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cab15aa8..52308c8b 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ elif (3, 0) < version < (3, 3): VERSION = '3.11' -install_requires = ['psutil', 'colorama', 'six', 'decorator'] +install_requires = ['psutil', 'colorama', 'six', 'decorator', 'bashlex'] extras_require = {':python_version<"3.4"': ['pathlib2'], ":sys_platform=='win32'": ['win_unicode_console']} diff --git a/thefuck/shells/bash.py b/thefuck/shells/bash.py index d6f4cdff..0ab32717 100644 --- a/thefuck/shells/bash.py +++ b/thefuck/shells/bash.py @@ -1,4 +1,5 @@ import os +import bashlex from ..conf import settings from ..utils import memoize from .generic import Generic @@ -45,3 +46,6 @@ class Bash(Generic): else: config = 'bash config' return 'eval $(thefuck --alias)', config + + def split_command(self, command): + return list(bashlex.split(command))