From 1da64f93793ff712f0abd9c12e8e918a993fd5e8 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 9 Jul 2019 11:28:57 -0500 Subject: [PATCH] Add Specify App When Opening From Command Line as a mac til --- README.md | 3 ++- ...cify-app-when-opening-from-command-line.md | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 mac/specify-app-when-opening-from-command-line.md diff --git a/README.md b/README.md index 1de783c..2e9f774 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_823 TILs and counting..._ +_824 TILs and counting..._ --- @@ -349,6 +349,7 @@ _823 TILs and counting..._ - [Run A Hardware Check](mac/run-a-hardware-check.md) - [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md) - [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md) +- [Specify App When Opening From Command Line](mac/specify-app-when-opening-from-command-line.md) - [View All Windows Of The Current App](mac/view-all-windows-of-the-current-app.md) ### MySQL diff --git a/mac/specify-app-when-opening-from-command-line.md b/mac/specify-app-when-opening-from-command-line.md new file mode 100644 index 0000000..1264ecb --- /dev/null +++ b/mac/specify-app-when-opening-from-command-line.md @@ -0,0 +1,20 @@ +# Specify App When Opening From Command Line + +When you `open` files from the command line + +```bash +$ open README.md +``` + +the default app for that filetype will be used. For me, `README.md` will be +opened in VS Code. + +If you have a different app in mind, you can specify it using the `-a` flag: + +```bash +$ open README.md -a Notes +``` + +This will open `README.md` in Mac's Notes app. + +See `man open` for more details.