summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-29 15:32:52 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-03-29 15:32:52 +0200
commit091564458b53eaa1b421ca4ae801cc4ab03b2f77 (patch)
tree24b1b0c4dbd58398439f26fd76a7a3b6af06c9cd
parent8a9ee7a63f2b34f0d9d19c19598c75213114cf80 (diff)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-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