I think it would be cleaner to use `getenv('EDITOR')` and if it's not defined, set a default based on the OS.