You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
malachite/src/operations/config.rs

18 lines
380 B
Rust

use crate::create_config;
use std::env;
use std::path::Path;
use std::process::Command;
pub fn config() {
if !Path::exists("mlc.toml".as_ref()) {
create_config();
}
let editor = env::var("EDITOR").unwrap_or_else(|_| "nano".to_string());
Command::new(editor)
.arg("mlc.toml")
.spawn()
.unwrap()
.wait()
.unwrap();
}