Application shortcut for commandline on OSX
Did you ever need to open Xcode project from current dir? Do you use lines like this one?
open that_project.xcworkspace/
'open' have handy switch '-a' which alows you to specify application in which you want to open specified file. With this option you can open current directory with Xcode and it will open project in that directory.
-a application
Specifies the application to use for opening the file
So with simple alias you can open xcode and have your project opened from command line.
alias xcode='open -a /Applications/Xcode.app/ .'
You can do this with any other application ie. RubyMine.
alias rubymine='open -a /Applications/RubyMine.app/ .'
Written by Valter Martinek
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Xcode
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#