I.e. ideally we should have a function like fn check_editor(path: &Path) -> PathBuf or some such that takes an editor path representing a user preference (e.g. taken from the environment) and returns the editor that the policy has decided for the user.
Alternatively (and perhaps better), we could simply offer a fn editor() -> PathBuf that checks the environment itself (and the env_editor and editor settings) and resolves the editor. CC PR #697
I.e. ideally we should have a function like
fn check_editor(path: &Path) -> PathBuf
or some such that takes an editor path representing a user preference (e.g. taken from the environment) and returns the editor that the policy has decided for the user.Alternatively (and perhaps better), we could simply offer a
fn editor() -> PathBuf
that checks the environment itself (and theenv_editor
andeditor
settings) and resolves the editor. CC PR #697