mac命令行将oc转化为c
Whenever I see a desktop GUI to accomplish a given web-related task, I'm dying to know the underlying operating system interaction to accomplish the same feat. Many of the GUIs I use are just a front for a command line utility for that more experienced developers would use.
每当我看到桌面GUI完成与网络相关的特定任务时,我都渴望了解与底层操作系统的交互以完成相同的壮举。 我使用的许多GUI只是命令行实用程序的前端,供经验丰富的开发人员使用。
I set out to find the command line script for setting the system's default browser on OS X but apparently there isn't one, but I did find a command line script for setting Chrome as the default browser:
我开始寻找用于在OS X上设置系统默认浏览器的命令行脚本,但显然没有,但是我确实找到了用于将Chrome设置为默认浏览器的命令行脚本:
open -a "Google Chrome" --args --make-default-browser
The script above opens Google Chrome and asks for confirmation that you'd like to make it the default browser. I'm not aware of what command line scripts would make other browsers the default browser, and I'm a bit annoyed that there isn't a single script to do so!
上面的脚本会打开Google Chrome浏览器,并要求您确认是否要将其设置为默认浏览器。 我不知道什么命令行脚本会使其他浏览器成为默认浏览器,我很生气,因为没有一个脚本可以这样做!
翻译自: https://davidwalsh.name/set-chrome-default-browser-command-line
mac命令行将oc转化为c