INNER CODE UNIT · Rust

new_with_commands

databricks/click · src/command_processor.rs:164

    fn new_with_commands(
        env: Env,
        hist_path: PathBuf,
        commands: Vec<Box<dyn Cmd>>,
    ) -> CommandProcessor {
        let env = Rc::new(env);
        let rl = get_editor(env.get_rustyline_conf(), &hist_path);
        CommandProcessor {
            env,
            rl,
            hist_path,
            commands,
        }
    }

    fn get_command_vec() -> Vec<Box<dyn Cmd>> {
        let commands: Vec<Box<dyn Cmd>> = vec![
            Box::new(crate::command::alias::Alias::new()),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…