Skip to content

Commit aff3e84

Browse files
authored
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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)