Since Git for Windows went up to 2 series, the commands handled in interactive mode such as python
with the attached Git Bash did not work well.
This seems to be a known bug (or specification?) Of MinTTY used in Git Bash, and it seems that commands with interactive mode can use winpty
. In other words, if you start python
on Git Bash as follows, it will work normally.
winpty python
If you have to add winpty
one by one, or if you are tired of it, you can also modify <Git installed folder> \ etc \ profile.d \ aliases.sh
. If you add the command you want to use via winpty to for name in ...
, it's OK.
aliases.sh
for name in node ipython php php5 psql python2.7 python
do
alias $name="winpty $name.exe"
done
There seems to be for some reason about why not do this in the first place, but I couldn't understand it even after reading it. (Because I have to distinguish whether it is Python of MSys2, but there is a way to distinguish it, it seems like a mystery). If you're worried, ʻipython` is officially included in 2.6.3, so if you want to go into interactive mode, you can use ipython (because it's also functionally richer). ..
reference
winpty
to run ipython, tooRecommended Posts