What is the process whereby ~/bin gets on my path in git bash?

Viewed 199

I noticed that in git bash I can put executable files in my ~/bin directory and the system will find them. However, that directory is not on my Windows path and I am not doing anything in my .profile that modifies my path, and I don't have any .bashrc file.

I don't really have a problem with this, but I would like to understand how it's happening.

1 Answers

that directory is not on my Windows path

It is on your bash PATH environment variable.

And it is there because of the /etc/profile.d/env.sh script (C:\path\to\git\etc\profile.d)

vonc@voncm MINGW64 /etc/profile.d
$ cat env.sh
# Add bin path in the home directory ontop of the PATH variable
export PATH="$HOME/bin:$PATH"

HOME is by default your %USERPROFILE%

Related