summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/core/imag-link/src/lib.rs2
-rw-r--r--bin/core/imag-link/src/ui.rs16
2 files changed, 18 insertions, 0 deletions
diff --git a/bin/core/imag-link/src/lib.rs b/bin/core/imag-link/src/lib.rs
index d4054429..676063fe 100644
--- a/bin/core/imag-link/src/lib.rs
+++ b/bin/core/imag-link/src/lib.rs
@@ -138,6 +138,8 @@ fn link_from_to<'a, I>(rt: &'a Runtime, from: &'a str, to: I) -> Result<()>
where I: Iterator<Item = &'a str>
{
let directional = rt.cli().is_present("directional");
+ let chain = rt.cli().is_present("chain");
+ let mesh = rt.cli().is_present("mesh");
let mut from_entry = get_entry_by_name(rt, from)?.ok_or_else(|| anyhow!("No 'from' entry"))?;
for entry in to {
diff --git a/bin/core/imag-link/src/ui.rs b/bin/core/imag-link/src/ui.rs
index 90aa2506..2ad63d32 100644
--- a/bin/core/imag-link/src/ui.rs
+++ b/bin/core/imag-link/src/ui.rs
@@ -116,6 +116,22 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.help("When creating links, make them directional")
.requires_all(&["from", "to"]))
+ .arg(Arg::with_name("chain")
+ .long("chain")
+ .takes_value(false)
+ .required(false)
+ .multiple(false)
+ .help("When creating links for more than two entries, make a chain rather than a mesh")
+ .conflicts_with("mesh"))
+
+ .arg(Arg::with_name("mesh")
+ .long("mesh")
+ .takes_value(false)
+ .required(false)
+ .multiple(false)
+ .help("When creating links for more than two entries, make a mesh rather than a chain")
+ .conflicts_with("chain"))
+
}
/// PathProvider