diff options
| author | Harris Kaufmann <harris@kaufmann.site> | 2020-01-25 01:25:46 +0100 |
|---|---|---|
| committer | Harris Kaufmann <harris@kaufmann.site> | 2020-01-25 01:25:46 +0100 |
| commit | a93c65a00dc24e4e1efdee5cb32169c7552b327c (patch) | |
| tree | f96f50878e8918d52a253bd6b469e4a7eea71493 /src/main.rs | |
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..fe0d61e --- /dev/null +++ b/src/main.rs @@ -0,0 +1,17 @@ +fn main() { + let mut it = std::env::args(); + + println!("who am i: {}", it.next().unwrap()); + + match it.next() { + Some(x) => match x.as_str() { + "init" => println!("Initializing..."), + _ => println!("unknown command"), + }, + _ => println!("not enough arguments"), + } + + for arg in it { + println!("{}", arg); + } +} |
