title: using Mac OSX "open" command to open URL with -n flag
body: <p>I'm having trouble getting /usr/bin/open to open a browser to a specific URL when using the -n flag.</p>
  
  <p>For example, this will work:</p>
  
  <pre><code>open -a "Google Chrome" "https://stackoverflow.com"
  </code></pre>
  
  <p>...successfully opening the desired page. However, if my browser is already open, it will open it in an existing window as a tab. The man page for open says this should be remedied with the -n flag, but:</p>
  
  <pre><code>open -n -a "Google Chrome" "https://stackoverflow.com"
  </code></pre>
  
  <p>...opens a new instance (window) of my browser to the homepage without navigating to the desired URL.</p>
  
  <p>I've also tried moving around the -n flag in the command and messing with other flags (such as -F).</p>
  
  <p>environment: macOS Sierra 10.12.6</p>
  
  <p>UPDATE: Here are some other solutions I've tried...</p>
  
  <p>I've tried adding --args before the URL. This makes it behave like the first command above, essentially ignoring the -n flag....</p>
  
  <pre><code>open -n -a "Google Chrome" --args "https://stackoverflow.com"
  </code></pre>
  
  <p>...will open the desired URL, but again in a tab and not a new window.</p>
  
  <p>I've tried making '--new-window' an option for --args:</p>
  
  <pre><code>open -a "Google Chrome" --args '--new-window' "https://stackoverflow.com"
  </code></pre>
  
  <p>...this behaves the same way as the -n flag, opening a new window but not passing it a URL.</p>
  
  <p>I've also tried putting the URL before the --args:</p>
  
  <pre><code>open -n -a "Google Chrome" "https://stackoverflow.com" --args '--new-window'
  </code></pre>
  
  <p>...this behaves as if I did not put the --args flag, opening the URL in another tab.</p>