PSD from Terminal

A laymen's explanation-ish.

I am a content maker and I have been using terminal more and more as a finder to execute actions as a coder would. If you do not know the terminal then I wouldn't mess around with this. But if you, like me, have intermediate to basic understanding of the terminal following these instructions will open a photoshop file from the terminal with just the keystrokes, "psd filename.psd". This will save you the time consuming process of finding the file you want to open in photoshop using the finder. There are many ways to execute the commands but below you will find the gist. I am using OSX 10.8.4 and opening Photoshop CC. ######################################### One: Open terminal. Two: Find and open your .bash_profile file with a plain text editor. It is hidden so you can't find it in the finder. Unless you show hidden files. I have the "mate" macro installed with my terminal so I use that. You could also use "vim" or "nano" within the terminal. For my instance I use "mate ~/.bash_profile". It will work by replacing "mate" with "nano" or "vim" but those guys are less intuitive for me. Three: Use finder to navigate to where your Photoshop.app is. Not the folder. Not the Package Contents. The app. Then go to file>info. The "name & Extension" should end with .app and the directory is listed under "where." Keep this finder info window open. Four: Take careful note of how you got here and what you are doing. You may type something in wrong and need to change it. So make sure you know what you are doing. Five: In your .bash_profile on a new line outside of any existing lines or groupings. I would just say on the bottom after everything, place this: ###code##begins##after##hashes#############alias psd="open -a /Applications/Adobe\ Photoshop\ CC/Adobe\ Photoshop\ CC.app ""$@"###code##ends##before##hashes############# Six: Your file path will probably differ from mine. I have all my programs installed at my root instead of in my user directory so I can access all programs as a guest. But you will need to check file path and make sure it matches up with your file path. You do this using that finder info window you have open. Also, I had a heck of a time making this work so I added "\" in front of every space in the file path. The "/" denotes a deeper folder and the "\" tells the comp not to get mixed up with the spaces. Note the two sets of double quotes at the end. Note everything and as I failed during my own process... be able to go back change, save, close and open everything. Between each change. I closed terminal. Closed Text Mate. Closed Photoshop. Seven: Now you need to test. You will need to place a file in your terminal root directory. So go to your terminal root directory by typing "cd" in the terminal. Then type "pwd" Take note of this location. Then using photoshop the old fashioned way save a file named test.psd with something in it to your root directory. The one that is shown when you type "pwd". Eight: Make sure the file is there and you are in the same directory as it in the terminal by typing, "cd" then press enter. Then type "ls -la" then press enter. You should see the file test.psd in the list. Eight: Okay test the test. After every change to this make sure you close your terminal, close your .bash_profile window and close photoshop. Nine: In Terminal. Type "psd test.psd" This should open photoshop and open the test.psd file at the same time. Huge timesaver. Remember that you will need to be in the directory of test.psd for it to just run like this. But if you are like me; moving from directory to directory in the terminal... you will If not you will need to enter the full file path to open a file. Good luck! Sorry for the unformatted text for the moment. If I were you I would take this text and paste it into a text editor with a larger font for clarity, especially with the linespaces!