   sendCommand: (command) ->
     atomWindow.sendCommand command for atomWindow in @windows when atomWindow.browserWindow.isFocused()
 
-  open: (pathToOpen = '') ->
-    pathToOpen = path.resolve(executedFrom, pathToOpen) if executedFrom
-
-    atomWindow = new AtomWindow
-      pathToOpen: pathToOpen
-      bootstrapScript: 'window-bootstrap',
-      resourcePath: @resourcePath
-
-    @windows.push atomWindow
+  open: (pathsToOpen) ->
+    pathsToOpen = [null] if pathsToOpen.length == 0
+    for pathToOpen in pathsToOpen
+      pathToOpen = path.resolve(executedFrom, pathToOpen) if executedFrom and pathToOpen
+
+      atomWindow = new AtomWindow
+        pathToOpen: pathToOpen
+        bootstrapScript: 'window-bootstrap',
+        resourcePath: @resourcePath
+
+      @windows.push atomWindow
 
   runSpecs: ->
     specWindow = new AtomWindow

    resourcePath = path.dirname(__dirname)

bootstrapApplication = ->
  parseCommandLine()
  setupNodePath()
  atomApplication = new AtomApplication({resourcePath, executedFrom})

  if pathsToOpen.length > 0
    atomApplication.open(pathToOpen) for pathToOpen in pathsToOpen
  else
    atomApplication.open()

delegate.browserMainParts.preMainMessageLoopRun = bootstrapApplication

BrowserWindow = require 'browser_window'
Menu = require 'menu'

net = require 'net'
fs = require 'fs'
path = require 'path'
optimist = require 'optimist'
