如何通过命令行在macOS上打开URL?
发布于 2022-05-08 00:39:40
我找到了两种通过命令行在macOS上打开URL的方法
1.
open https://google.com
on run argv
tell application "Safari"
open location item 1 of argv
activate
end tell
end run
osascript open-safari.applescript https://google.com
发布于 2022-05-08 11:17:09
open location <theUrl>
是AppleScript知道的,可以直接打开url。默认浏览器将被触发。不需要显式调用Safari。
https://stackoverflow.com/questions/72157101
复制相似问题