How can I start aquaemacs with a file at command prompt

Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
open /Applications/Aquaemacs.app

the name at the end might be different, it's important to type the .app

Edit:
oh and I'm assuming that you have the app in the /Applications folder :)

you can use tab to quicken your work, type "open /App" then press tab, it will complete the path for you, then type "Aq" and tab and it will probably complete the aquaemacs for you as well
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You're going to want to put the filename after the "open /Applications/AquaMacs.app" (or whatever aquamacs is names as) if you want it to open with the file.

So, if I wanted to open test.txt, I would type:
Code:
open /Applications/AquaMacs.app test.txt

As scathe stated, use tab to complete keywords at the CLI. It makes typing commands much faster.
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
lol how stupid of me, I guess I wasn't thinking right at the moment to forget the file name at the end :) +1 vansmith

anyway keep in mind that if you only type a name, bash assumes the file is in your home directory, so if you want some other file, you need to specify the path to that as well:

open /Applications/Aquamacs\ Emacs.app ~/Desktop/temp.txt
this will open the file temp on your desktop

comment:
the backslash after Aquamacs has to be there, it escapes the next character and tells bash to ignore the space, otherwise space separates the command from the file
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you are using tab to finish commands, you shouldn't have to worry about entering the escaping slashes between words - it will be done for you.

You can also put the command in quotations and not worry about having to use an escaping slash:
Code:
open "/Applications/Aquamacs Emacs.app"
That will work just as well.

Just to add to scathe, the tilde (~) signifies your user (home) directory. It saves having to type /Users/<username> every time. Just in case you didn't know.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top