1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

modified cd_mkdir.py to work with powershell on linux

This commit is contained in:
ICalhoun 2021-05-07 16:20:58 -04:00
parent e45e772ae6
commit 72d6759b26
3 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import colorama
from .conf import settings
from . import const
def color(color_):
"""Utility for ability to disabling colored output."""
if settings.no_colors:

View File

@ -2,7 +2,7 @@ import re
from thefuck.utils import for_app
from thefuck.specific.sudo import sudo_support
from thefuck.shells import shell
import os
@sudo_support
@for_app('cd')
@ -19,5 +19,5 @@ def match(command):
@sudo_support
def get_new_command(command):
repl = shell.and_('mkdir -p \\1', 'cd \\1')
repl = 'mkdir -p \\1; cd \\1'
return re.sub(r'^cd (.*)', repl, command.script)

View File

@ -17,5 +17,5 @@ def match(command):
@sudo_support
def get_new_command(command):
repl = shell.and_('mkdir -p \\1', 'chdir \\1')
repl = 'mkdir -p \\1; chdir \\1'
return re.sub(r'^chdir(.*)', repl, command.script)