Trying to launch Atom in Git bash

0

I create an alias

$ echo 'alias atom="C:\Users\myUser\AppData\Local\atom\atom.exe"' >> ~/.bashrc  

I open bashrc file with VI editor and it shows the alias. But when I tried to use the alias it gives me the folowing error

$ atom start.txt
bash: C:UsersMyUserAppDataLocalatomatom.exe: command not found
$ atom
bash: C:UsersmyUserAppDataLocalatomatom.exe: command not found

ThisNameWasTaken

Posted 2017-06-13T19:44:13.423

Reputation: 23

Based on the error message and the fact that you used double quotes, you may need to double each \ . So replace each \ by \ or by / – Patrick Mevzek – 2018-07-31T14:47:02.510

Answers

0

You need to modify the alias to use the cd command to navigate to the location with the .exe, and then use ./ to execute the .exe.

Here is an example that I made in Cygwin to execute Sublime Text with an alias sublime.

alias sublime="cd /cygdrive/c/Program\ Files/Sublime\ Text\ 3/ && ./sublime_text.exe"

With Git Bash I think you can just do cd /c/... && ./program.exe

DrZoo

Posted 2017-06-13T19:44:13.423

Reputation: 8 101

0

I had the same problem, and I solved it using an expecific version of atom (in my case "app-1.28.2"):

alias atom="/c/Users/Usuario/AppData/Local/atom/app-1.28.2/atom.exe"

Morfeo WS

Posted 2017-06-13T19:44:13.423

Reputation: 1