It would be nice if we could move this behaviour into a method. The options parsing already has a lot going on.