Search code examples
macoscommand-line-interfaceatom-editorhyperterminal

How to get Hyper Terminal to recognize the command "atom ." to launch Atom?


This question was asked by Van Adrian Cabrera 5 years ago, but the solution was Windows only. I am brand new to Mac's OS, and i have installed Hyper Terminal and Atom. I "cd" to my desktop folder where my files are located:

[my macbook directory] webdev % cd Secrets\ -\ Starting\ Code 
[my macbook directory] Secrets - Starting Code % ls -a
.               .DS_Store       public
..              app.js          views
[my macbook directory] Secrets - Starting Code % atom .
zsh: command not found: atom

But as you can see, the "atom ." command to launch atom in that specified directory does not work, (which i am used to doing on Windows).

Thank you 😃


Solution

  • You can follow several ways:

    • Use absolute path(as described https://flight-manual.atom.io/getting-started/sections/installing-atom/). Run which atom and then open file/folder like PATH_TO_ATOM .
    • Add Atom path to PATH with a help of export PATH="$PATH:{PATH_TO_ATOM}". You can add this export to the file like ~/.zshrc in the home folder to avoid executing an export command on each terminal session
    • Install Atom using brew with a help of the brew cask install atom command in the terminal - the easiest way. No extra effort is required. You can use atom . command after installation