Open files, apps, or URLs using default application
Arguments
Name
Description
name
filepaths, folders
Options
Name
Description
-a <Application>
Specify the application to use for opening the file
-b <Bundle Identifier>
Specify the bundle identifier of the app to use to open the file
-D
Reveals the enclosing folder in finder
-e
Opens the file with /Applications/TextEdit
-t
Open the file with the default text editor
-f
Read input from standard input and open the results in the default text editor
-F, --fresh
Opens the application without restoring windows
-W, --wait-apps
Waits until the applications exit
-R, --reveal
Reveals the file(s) in the Finder instead of opening them
-n, --new
Open a new instance of the application(s) even if one is already running
-j, --hide
Launches the app hidden
-g, --background
Do not bring the application to the foreground
-h, --header
Searches header locations for a header whose name matches the given string and then opens it
-s <partial SDK name>
For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched
-u, --url <URL>
Open this URL, even if it matches exactly a filepath
-i, --stdin <PATH>
Launches the application with stdin connected to PATH; defaults to /dev/null
-o, --stdout <PATH>
Launches the application with /dev/stdout connected to PATH
--stderr <PATH>
Launches the application with /dev/stderr connected to PATH
--env <VAR>
Repeatable ♾
--args <Arguments...>
All remaining arguments are passed to the opened application in the argv parameter to main(). These arguments are not opened or interpreted by the open tool