How to open Atom editor from command line in OS X?

后端 未结 18 1879
天命终不由人
天命终不由人 2020-12-02 03:44

I have the Atom editor and was wondering how you can open a file or folder from the terminal in Atom. I am using a Mac. I am looking for a way to do this:

at         


        
18条回答
  •  天涯浪人
    2020-12-02 04:06

    Upgrading Atom appears to break command line functionality on the occasion. Looks like in my case it created two versions of the application instead of overwriting them. Occurs because the new file structure doesn't match file paths created by "Atom -> Install Shell Commands". In order fix the issue you'll need to do the following.

    1. Move "Atom X" from Documents into Applications (why it ended up in here, I have no idea)
    2. Rename "Atom X" to "Atom"
    3. Might need to restart your terminal and Atom

    After that everything should work just like it did before. Hopefully this saves someone 30 minutes of poking around.

提交回复
热议问题