How can I launch Chrome with flags from command line more concisely?

后端 未结 4 678
执念已碎
执念已碎 2021-02-02 07:57

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
         


        
4条回答
  •  春和景丽
    2021-02-02 08:51

    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 command open -a Google\ Chrome --args --disable-web-security

提交回复
热议问题