Crates.io | editor-command |
lib.rs | editor-command |
version | 0.1.1 |
source | src |
created_at | 2024-08-16 23:59:51.030419 |
updated_at | 2024-09-05 10:59:32.468954 |
description | Open files in a user's configured editor |
homepage | |
repository | https://github.com/LucasPickering/editor-command |
max_upload_size | |
id | 1341130 |
size | 21,908 |
Load a user's preferred file editing command from the VISUAL
or EDITOR
environment variables.
use editor_command::EditorCommand;
use std::process::Command;
std::env::set_var("VISUAL", "vim");
let mut command: Command = EditorCommand::edit_file("file.txt").unwrap();
command.spawn();