mirror of https://github.com/helix-editor/helix
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.
25 lines
374 B
Rust
25 lines
374 B
Rust
mod editor;
|
|
|
|
use editor::Editor;
|
|
|
|
use argh::FromArgs;
|
|
use std::{env, path::PathBuf};
|
|
|
|
use anyhow::Error;
|
|
|
|
#[derive(FromArgs)]
|
|
/// A post-modern text editor.
|
|
pub struct Args {
|
|
#[argh(positional)]
|
|
files: Vec<PathBuf>,
|
|
}
|
|
|
|
fn main() -> Result<(), Error> {
|
|
let args: Args = argh::from_env();
|
|
let mut editor = Editor::new(args)?;
|
|
|
|
editor.run()?;
|
|
|
|
Ok(())
|
|
}
|