Skip to content

Commit aff3e84

Browse files
authoredMay 22, 2021
Add open.apps.edge (#252)
1 parent 18b9665 commit aff3e84

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed
 

‎index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ declare namespace open {
4343

4444
type AppName =
4545
| 'chrome'
46-
| 'firefox';
46+
| 'firefox'
47+
| 'edge';
4748

4849
type App = {
4950
name: string | readonly string[];

‎index.js

+8
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ defineLazyProperty(apps, 'firefox', () => detectPlatformBinary({
265265
wsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
266266
}));
267267

268+
defineLazyProperty(apps, 'edge', () => detectPlatformBinary({
269+
darwin: 'microsoft edge',
270+
win32: 'msedge',
271+
linux: 'microsoft-edge'
272+
}, {
273+
wsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'
274+
}));
275+
268276
open.apps = apps;
269277

270278
module.exports = open;

‎readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ await open('https://google.com', {
117117

118118
- [`chrome`](https://www.google.com/chrome) - Web browser
119119
- [`firefox`](https://www.mozilla.org/firefox) - Web browser
120+
- [`edge`](https://www.microsoft.com/edge) - Web browser
120121

121122
## Caveats
122123

‎xdg-open

+1-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ open_generic()
926926
if [ x"$BROWSER" = x"" ]; then
927927
BROWSER=www-browser:links2:elinks:links:lynx:w3m
928928
if has_display; then
929-
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER
929+
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:microsoft-edge:$BROWSER
930930
fi
931931
fi
932932

0 commit comments

Comments
 (0)
Please sign in to comment.