-
Notifications
You must be signed in to change notification settings - Fork 5
/
launch.1
129 lines (129 loc) · 4.18 KB
/
launch.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.Dd Mon Apr 2 2018 \" DATE
.Dt LAUNCH 1 LOCAL \" Program name and manual section number
.Os launch 1.2.5
.Sh NAME
.Nm launch
.Nd find, open, print, or get information on files, folders, volumes and URLs
.Sh SYNOPSIS
.Nm launch
.Op Fl npflswbmhLU \" [-npflswbmhLU]
.Op Fl c Ar creator \" [-c creator]
.Op Fl i Ar bundleID \" [-i bundleID]
.Op Fl u Ar URL \" [-u URL]
.Op Fl a Ar name | Ar path \" [-a name|path]
.Op Fl o Ar argument \" [-o argument]
.Op Ar item ... \" [item ...]
.Op Ar - \" [-]
.Sh DESCRIPTION
The
.Nm
command is a replacement for macOS's
.Xr open 1
command and opens a file (or a folder/directory or URL), as if you had
double-clicked its icon in the Finder. If no application is specified,
the default application determined by Launch Services is used to open
items.
.Pp
.Nm
invoked with a file or URL argument will open the URL directly or in
your preferred helper application. Applications can be specified by
their four-character creators (e.g. 'ToyS') or Java-style bundle ID
(e.g. com.apple.ScriptEditor2).
.Pp
.Nm
can ask applications to print documents. It can open applications in
the background; can open multiple copies of applications; and can show
information about any item in a filesystem, including file type,
creator, data fork and total sizes, dates, and bundle ID.
.Pp
The options to
.Nm
are divided in three sections according to purpose.
.Nm
can search for an application in several ways, using the matching
options. Once
.Nm
has identified one or more items, the action options control what
.Nm
does with these items. Finally, if the action involves launching an
application, the launch options allow further customization.
.Ss Matching options
.Bl -tag -width -indent
.It Fl c Ar creator
Match by creator (a four-character code, also known as a signature).
.It Fl i Ar bundleID
Match by bundle identifier, usually consisting of the reversed dot
(.)-separated components of the application developer's Internet domain
name, followed by the application name. For example, the Finder's
bundle identifier is
.Ar com.apple.Finder .
Bundle identifiers are not case-sensitive.
.It Fl u Ar URL
Match application at
.Ar URL
(which must be a file:// URL).
.It Fl a Ar name | Ar path
Match application named
.Ar name
or at the path
.Ar path .
.El
.Pp
In addition to the above, you can specify applications, documents,
folders, volumes and URLs as item arguments.
.Ss Action options
.Bl -tag -width -indent
.It Fl n
Print matching paths/URLs instead of opening them.
.It Fl p
Ask application(s) to print document(s).
.It Fl f
Display information about matched application or item(s).
.It Fl l
Launch URLs, treating schemeless URLs (e.g. "www.apple.com" or
"launchsw@sabi.net") as Web sites and email addresses.
.El
.Ss Launch options
.Bl -tag -width -indent
.\" .It Fl s
.\" Launch target(s) as superuser, authenticating if needed.
.It Fl w
Wait for application to finish opening before exiting.
.It Fl b
Launch application/URL in the background.
.It Fl m
Launch application again, even if already running.
.It Fl h
Hide application after it finishes opening.
.It Fl L
Suppress the normal opening behavior of the application; for example,
opening an untitled document. (This works by sending a "launch", or
ascr/noop, Apple event to the application.)
.It Fl U
Interpret items as URLs, even if files with the same names as the URLs
exist. (This was the default behavior in
.Nm
1.0.)
.It Fl o Ar argument
Pass
.Ar argument
as an argument to the application. Some graphical applications
support command-line arguments. For example, you can open the Mozilla
Firefox Profile Manager with
.Ic launch -i org.mozilla.firefox -o -ProfileManager.
You can specify
.Fl o Ar argument
more than once with additional arguments.
.El
.Sh SEE ALSO
.\" List links in ascending order by section, alphabetically within a section.
.\" Please do not reference files that do not exist without filing a bug report
.Xr appswitch 1 ,
.Xr GetFileInfo 1 ,
.Xr open 1
.Sh AUTHOR
.An "Nicholas Riley" Aq launchsw@sabi.net
.Pp
Original man page written by
.An "Hisashi T Fujinaka" Aq htodd@twofifty.com .
.\" .Sh HISTORY \" Document history if command behaves in a unique manner