Skip to content

Commit

Permalink
mutiple arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
geremachek committed Aug 4, 2021
1 parent 4863712 commit d18d866
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "merlin"
version = "1.0.16"
version = "1.0.17"
authors = ["geremachek <[email protected]>"]
edition = "2018"

Expand Down
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ fn main() {
.help("Silence errors"))
.arg(Arg::with_name("NOTATION")
.index(1)
.multiple(true)
.help("Merlin notation to evaluate before entering the shell"))
.get_matches();

let mut p = plane::Plane::new(!merlin_args.is_present("no-errors"));

// parse the first argument as MN
// parse the first argument(s) as MN

if let Some(n) = merlin_args.value_of("NOTATION") {
p.parse_line(n);
if let Some(n) = merlin_args.values_of("NOTATION") {
p.parse_line(&n.collect::<Vec<&str>>().join(" "));
}

// start the shell
Expand Down

0 comments on commit d18d866

Please sign in to comment.