0

Here is a snippet from my .bash_profile:

    alias hi=“echo hi”
    alias oe=“open -e”
    alias u=“cd ..”
    alias uu="cd ../../“
    alias uuu=“cd ../../../“

If I attempt to run a command using an alias, a quote is inserted into the beginning of the command, so it fails:

    ~ tudanp$ hi
    -bash: “echo: command not found

I have tried both single and double quotes, quotes around the alias name, and no quotes around the command with none working (well, none around the command will insert everything before the first whitespace). Anyone have any idea what's going on?

  • 6
    What are you using to edit the file? those look like unicode "smart" quotes - you need to replace them with regular ASCII quote characters – steeldriver Jun 22 '18 at 20:25
  • @steeldriver thanks, this is the solution. I was using apple's text editor, when I clearly shouldn't be. – Paul Tudan Jun 22 '18 at 20:33
1

Open your .profile in a text editor, and replace all of the s with "s, and I think you'll be a happier camper.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.