如何更简洁地从命令行启动Chrome的标志? [英] How can I launch Chrome with flags from command line more concisely?
问题描述
我正在开发一个WebGL驱动的应用程序,我想从命令行启动chrome这样:
open -a Google\ Chrome --args --disable-web-security
我只是不想必须在每一个时间键入。有没有办法轻松地把它变成一个单字命令?
只要在.bashrc或.bash_profile
$中建立别名b$ b
alias ogc ='open -a Google\ Chrome --args --disable-web-security'
然后重新载入您的shell。
exec $ SHELL
现在,每次输入
ogc
(或任何你想调用它)在终端,它将运行完整的命令open -a Google\ Chrome --args --disable-web-security
I am developing a WebGL driven application and I want to launch chrome like this from the command line:
open -a Google\ Chrome --args --disable-web-security
I just don't want to have to type that in every single time. Is there a way to easily turn that into a one word command? I am using a mac if it matters.
解决方案Just make an alias in your .bashrc or .bash_profile
alias ogc='open -a Google\ Chrome --args --disable-web-security'
And then reload your shell.
exec $SHELL
Now, every time you type
ogc
(or whatever you want to call it) in your terminal, it will run the full commandopen -a Google\ Chrome --args --disable-web-security
这篇关于如何更简洁地从命令行启动Chrome的标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!