mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 23:22:10 +00:00 
			
		
		
		
	bash: use bashlex for split_command, not shlex
This commit is contained in:
		
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| @@ -31,7 +31,7 @@ elif (3, 0) < version < (3, 3): | |||||||
|  |  | ||||||
| VERSION = '3.11' | VERSION = '3.11' | ||||||
|  |  | ||||||
| install_requires = ['psutil', 'colorama', 'six', 'decorator'] | install_requires = ['psutil', 'colorama', 'six', 'decorator', 'bashlex'] | ||||||
| extras_require = {':python_version<"3.4"': ['pathlib2'], | extras_require = {':python_version<"3.4"': ['pathlib2'], | ||||||
|                   ":sys_platform=='win32'": ['win_unicode_console']} |                   ":sys_platform=='win32'": ['win_unicode_console']} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| import os | import os | ||||||
|  | import bashlex | ||||||
| from ..conf import settings | from ..conf import settings | ||||||
| from ..utils import memoize | from ..utils import memoize | ||||||
| from .generic import Generic | from .generic import Generic | ||||||
| @@ -45,3 +46,6 @@ class Bash(Generic): | |||||||
|         else: |         else: | ||||||
|             config = 'bash config' |             config = 'bash config' | ||||||
|         return 'eval $(thefuck --alias)', config |         return 'eval $(thefuck --alias)', config | ||||||
|  |  | ||||||
|  |     def split_command(self, command): | ||||||
|  |         return list(bashlex.split(command)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user