aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/args.rs')
-rw-r--r--helix-term/src/args.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs
index c3019ea7..d16d7dfd 100644
--- a/helix-term/src/args.rs
+++ b/helix-term/src/args.rs
@@ -14,6 +14,7 @@ pub struct Args {
pub build_grammars: bool,
pub split: Option<Layout>,
pub verbosity: u64,
+ pub config_file: Option<PathBuf>,
pub files: Vec<(PathBuf, Position)>,
}
@@ -43,6 +44,10 @@ impl Args {
anyhow::bail!("--grammar must be followed by either 'fetch' or 'build'")
}
},
+ "-c" | "--config" => match argv.next().as_deref() {
+ Some(path) => args.config_file = Some(path.into()),
+ None => anyhow::bail!("--config must specify a path to read"),
+ },
arg if arg.starts_with("--") => {
anyhow::bail!("unexpected double dash argument: {}", arg)
}