Skip to main content

program_for

Function program_for 

Source
pub fn program_for(
    document: bool,
    env: impl Fn(&str) -> Option<String>,
) -> Program
Expand description

The program for a file, from the environment env looks up: a document goes to the opener; text to $VISUAL, $EDITOR, $PAGER, then less outside Windows, then the opener. A program set to blank counts as unset. Its words are split at spaces, so code --wait runs code with --wait.