How to Open an App from Anywhere on Mac Command Line

By  on  

Many engineers like myself live in the command line, and perform actions from command line that most others would click an icon for. I've always found opening apps from command line on Macs painful. You need to references the Applications directory, add .app to the name, etc. I just want to open apps by name.

To open an app from any directory by its simple name, you can use the -a argument to open:

open -a  Cyberduck

# Works regardless of case as well
open -a CyBeRdUcK

I love -a for a command like open. Being able to open any app by name is exactly what I want!

Recent Features

Incredible Demos

  • By
    Control Element Outline Position with outline-offset

    I was recently working on a project which featured tables that were keyboard navigable so obviously using cell outlining via traditional tabIndex=0 and element outlines was a big part of allowing the user navigate quickly and intelligently. Unfortunately I ran into a Firefox 3.6 bug...

  • By
    CSS Sprites

    The idea of CSS sprites is pretty genius. For those of you who don't know the idea of a sprite, a sprite is basically multiple graphics compiled into one image. The advantages of using sprites are: Fewer images for the browser to download, which means...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!