nvbn/thefuck

Hitting enter does not execute the previous command in Windows Git Bash

Open

#672 opened on Jul 28, 2017

View on GitHub
 (6 comments) (10 reactions) (0 assignees)Python (96,953 stars) (3,949 forks)batch import
hacktoberfesthelp wanted

Description

$ echo "foo'
> ^C
$ fuck
echo "foo" [enter/↑/↓/ctrl+c]
(hangs here...)

This is on Windows Git Bash (bash 4.4). thefuck --version and type fuck are below.

$ thefuck --version
The Fuck 3.18 using Python 2.7.13

$ type fuck
fuck is a function
fuck ()
{
    TF_PREVIOUS=$(fc -ln -1);
    TF_PYTHONIOENCODING=$PYTHONIOENCODING;
    export TF_ALIAS=fuck;
    export TF_SHELL_ALIASES=$(alias);
    export PYTHONIOENCODING=utf-8;
    TF_CMD=$( thefuck $TF_PREVIOUS THEFUCK_ARGUMENT_PLACEHOLDER $@ ) && eval $TF_CMD;
    export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
    history -s $TF_CMD
}

Contributor guide