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

后端 未结 18 1868
天命终不由人
天命终不由人 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:15

    Another simple solution is to add /usr/local/bin to your PATH. I had the same issue, I installed shell commands (see shaheenery's response) the symlinks already existed and pointing to the correct destination (see thomax's response), however I would still get 'not found'. I'm using Korn Shell btw.

    Here's what I did:

    1. Open your ~/.profile using your choice of editor (in my case $ emacs ~/.kshrc)
    2. Add this line: export PATH="/usr/local/bin:${PATH}"
    3. Save and exit
    4. Restart terminal or source ~/.profile
    5. Test $ atom -h

提交回复
热议问题