Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9186

Windows & Git Bash: Bash PATH to read Windows %PATH% system variable

$
0
0

I've recently added a directory to the Windows PATH manually by going into Control Panel -> System -> Advanced system settings -> Environment Variables -> User variables -> PATH. (Windows 7, 64-bit.)

After rebooting and starting cmd.exe, echo %PATH% indicates that this worked: I see the directory I recently added in the output.

However, after starting Git Bash, the output of echo $PATH doesn't include this directory.

I could add export PATH=$PATH:/c/my/path in my bashrc but I'd rather Git Bash just get PATH from Windows so I don't have to remember to add paths to two places. How can this be accomplished?

(A more general related question is, what sets up Git Bash's $PATH? I see a couple of entries repeated in different places, some things that are in Windows %PATH% are in Git Bash's $PATH but not others. What all happens before I get the Git Bash prompt that touches $PATH?)


Viewing all articles
Browse latest Browse all 9186

Trending Articles