0

I'm a newbie, so no laughter at or mocking of me for any illiteracy I exhibit please!

I am able to get Python to work already in Git Bash, but to do so I have to input the following command every time I open Git Bash before I can enter interactive mode.

alias python='winpty python.exe'

It is tedious to have to do this every time I log into the command line. How do I ensure that Git Bash performs this function automatically upon logging on?

1 Answers1

1

Start "Git Bash" then execute something like the following to modify your user's .bashrc:

$ echo 'alias python="winpty python.exe"' >> ~/.bashrc

Then exit "Git Bash" and start it again. You'll see something like this:

Restarted Git Bash

Now run alias and you should see this:

$ alias
alias python ='winpy python.exe'
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
eestrada
  • 1,475
  • 14
  • 22
Red Cricket
  • 8,734
  • 16
  • 67
  • 148
  • I tried your first step, then exited Git Bash and opened it again. But it just opens as normal; I did not see the text you said should appear. – CDMacalister Mar 04 '19 at 01:53