2

Within GitBash, is there a way to open programs similar to the way you can type the program name in Mac and it runs? For instance, typing 'Sublime' into GitBash on a Mac will open up a Sublime window. I'd like to be able to do that on a pc... 'run', 'open', 'runas', all don't work. Thankyou.

2 Answers 2

5

Here's how to set this up for Windows using Git Bash. FYI some of my translations might be off as I'm using a Dutch version of Windows:

  1. Right-click "My Computer"
  2. "Properties"
  3. "Advanced Systems Settings"
  4. "Environment Variables"
  5. Locate the Path variable
  6. Add the path of the folder where the executable of the program you want to launch can be found at the end, separate each path with a ";"
  7. Restart Git Bash
  8. Now typing the name of the executable without the extension will launch the programme
  9. I find it easiest here to add an alias to your .bash_profile file as some executables have weird names (Microsoft Office Package for example). You can do this through the command line as well.
Sign up to request clarification or add additional context in comments.

Comments

2

If running the application from command line is a requirement, then

Option 1 - Include in path the directory where the application is stored

Option 2 - See the contents of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" and include the applications you need. You can start they form windows run dialog (Win + R) giving its name, or from command line with start appName

There are more options, but all of them require coding or installation of third party programs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.