Fix editor command to use environment vars to work appropriately on OS X