Your problem is with the "smart quote" “ ”
characters; replace those with the normal quote character "
.
Aliases not working in Unix .profile file in Terminal.app (Mac OS X 10.9)
Question
I cannot get aliases to work correctly in my Terminal.app. I created a ".profile" file in my home directory (/Users/my_username) using:
touch ~/.profile
Then I opened this file using TextEdit and entered the following:
PS1="(\!) \w: "
alias rm=“rm -i”
alias cp=“cp -i”
alias mv=“mv -i”
The PS1 line works fine but every time I start up a new window in the Terminal.app it reads out the following:
-bash: alias: -i”: not found
-bash: alias: -i”: not found
-bash: alias: -i”: not found
I have read it may have to to with my .bashrc file but I have no idea where to find this and was under the impression that I could get aliases to work without editing that file.
What should I try next?
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow