in-just
in-just

Reputation: 194

bash: alias: =: not found error upon opening Git Bash

Every time I start Git Bash I'm running into this error (see screenshot)

I setup Sublime for Git Bash https://www.udacity.com/wiki/ud775/sublime

Instead of using the "C:/Program\ Files/Sublime\ Text\ 2/sublime_text.exe" extension I used "C:\Program Files\Sublime Text 3\sublime_text.exe" the first time around. It now works properly to open Sublime using 'subl' but I receive the bash: alias: =: not found everytime I open up Git Bash.enter image description here

Upvotes: 0

Views: 3324

Answers (3)

djangofan
djangofan

Reputation: 29679

On a Mac, with OSX, I use:

alias edit="open -a '.../Sublime Text.app/Contents/MacOS/Sublime Text' '$@'"

note: ... is just for brevity here

Upvotes: 0

mqueirozcorreia
mqueirozcorreia

Reputation: 943

I was having the same issue. You need to escape every white space with "\".

So change your commando to:

alias subl='C:/Program\ Files/Sublime\ Text\ 3/sublime_text.exe'

Upvotes: 0

user2683246
user2683246

Reputation: 3568

it seems that in your ~/.bashrc you have two similar, but slightly different lines:

alias subl='C:\Program Files\Sublime Text 3\sublime_text.exe'
alias subl = 'C:\Program Files\Sublime Text 3\sublime_text.exe'

Look at the second one, it has spaces around an equal sign, so it is interpreted as not aliasing, but listing aliases for space separeted arguments subl, =, and 'C:\ ...'.

Make sure you have only one appropriate line in your ~/.bashrc file.

Upvotes: 4

Related Questions