Maybe pick up ::env(EDITOR) ?