0

Trying to set up my bash_profile but I don't know what I'm doing wrong.

touch ~/.bash_profile

And...

open ~/.bash_profile

Save and close the .bash_profile. Then close and re-open Terminal and I get this:

Last login: Sat Dec 12 12:52:20 on ttys000
-bash: alias: /Users/BilboBaggins/bash_profile’: not found

What am I doing wrong? The contents of my .bash_profile looks as follows:

alias bp='open ~/.bash_profile' 
  • Which app opens after entering open ~/.bash_profile in Terminal? – klanomath Dec 12 '15 at 21:13
  • I use .profile instead of .bash_profile however I followed your steps and it works fine on my system. BTW the .bash_profile file opened in TextEdit for me to add alias bp='open ~/.bash_profile' and it too is the only line in the target file. Are you sure Terminal was completely closed after the saved edit and then reopened? – user3439894 Dec 12 '15 at 21:17
  • The error line looks odd it does not have the . in it 2) there is a ` in it - have you copied the correct error? – Mark Dec 12 '15 at 21:51
  • Try open $HOME/.bash_profile for alias. – user14492 Dec 12 '15 at 23:12
  • @klanomath TextEdit – Hovanky Dec 13 '15 at 0:11
1

I copy and pasted code again from Safari into TextEdit and it worked.

 alias bp='open ~/.bash_profile' 

I deleted my profile, re-started Terminal, and re-did it by hand, and it broke again. It only works when I paste the code from Safari. So weird. No idea why this is.

If anyone has any idea, let me know because i'm so confused.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .