How can I force command-line arguments to a program shortcut in the dock? I have Chrome installed in Applications, and a shortcut to it in the Dock.
How can I achieve to force some command-line arguments to each start-up of this app?

Let me be clearer, in the Terminal, I can do this:
open /Applications/Google\ Chrome.app --args --explicitly-allowed-ports=6666
And that way I modify Chrome's behavior as I like it.
How can I have this option by default when launching the app from the Finder of the Dock?
One way to do this is with AppleScript.

Open AppleScript Editor (/Applications/Utilities) and type this in:

do shell script "open '/Applications/Google Chrome.app'  --args --explicitly-allowed-ports=6666"


Save it as an Application, and add that application to the Dock.
Click on the app's icon and you Chrome will open with your custom parameters.

This way works, but it isn't exactly ideal for a couple reasons:


Running the AppleScript will take a little longer than just opening the app
You'll have two icons in your dock (the script and Chrome)


This will work, but I'm interested to see if someone comes up with a better answer.