markdown 从MacOS CLI在Firefox中打开URL

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 从MacOS CLI在Firefox中打开URL相关的知识,希望对你有一定的参考价值。

# Open URL in Firefox Internet Browser from MacOS CLI

Firefox provide a set of Command Line Options to configured the browser before we execute them.
Ref. URL https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

**Objectives**
- Open `http://localhost:3000` in a new Firefox Instance for local development purposes
- Use a spesific Firefox profile prepared for development purposes
- Can integrate into automation workflow as in Alfred3 App

Don't forget to create a new profile for local development, use Firefox Profile Manager in order to do this.

``` bash
$ /Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager
```
![Firefox Profile Manager](https://i.imgur.com/RxVrl1g.png)

**Command to run**

Execute Firefox to open a new instance of Firefox browser with the `LocalDev` Profile, and start with `Development Tools` enabled.

- Open specific URL `http://localhost:3000`
- Open New Firefox Browser Instance  `-new-instance`
- Use a spesific profile `-P "LocalDev"`
- With Development Tools enabled `-devtools`

``` bash
$ /Applications/Firefox.app/Contents/MacOS/firefox http://localhost:3000 -new-instance -P "LocalDev" -devtools
```

以上是关于markdown 从MacOS CLI在Firefox中打开URL的主要内容,如果未能解决你的问题,请参考以下文章

如何从 CLI 快速重命名 macOS 或 linux 上的文件?

markdown 从CLI更改PDF标题

markdown 从CLI快捷方式搜索命令

markdown Python - 从cli调用作业命令

markdown 从命令行界面创建可启动的macOS usb安装程序

markdown 从CLI推送文本到创建的文件