Inital commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "lime-cli"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "lime"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
clap.workspace = true
|
||||
lime-core = { path = "../lime-core" }
|
||||
lime-ui = { path = "../lime-ui" }
|
||||
@@ -0,0 +1,26 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use lime_ui::{run_app, AppOptions};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(name = "lime")]
|
||||
#[command(about = "A clean, modern terminal text editor")]
|
||||
struct Cli {
|
||||
/// File or directory to open
|
||||
path: Option<PathBuf>,
|
||||
|
||||
/// Open very large files without confirmation/refusal
|
||||
#[arg(long)]
|
||||
force: bool,
|
||||
|
||||
/// Path to a Lime config file
|
||||
#[arg(long)]
|
||||
config: Option<PathBuf>,
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let cli = Cli::parse();
|
||||
run_app(AppOptions::new(cli.path, cli.force, cli.config))
|
||||
}
|
||||
Reference in New Issue
Block a user