diff options
| author | Teddy Wing | 2016-04-05 22:36:06 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-05 22:37:05 -0400 |
| commit | 0bdf385c57156b6e9d782fddb2dd6f2016cc0620 (patch) | |
| tree | 9f1ac6592071e4a0406127643e332743bb4fcef1 /src | |
| parent | 3047906677b194f6f6ecbc2cf39662a4f1f5d97a (diff) | |
| download | mutt-alias-auto-add-0bdf385c57156b6e9d782fddb2dd6f2016cc0620.tar.bz2 | |
Find "From: " line in input
Look for the line that begins "From: " in the email message given to us.
When we find it, we'll call a function that we're going to define soon
that handles adding an alias to our Mutt aliases file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index a30b4da..a0cca2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,13 @@ fn main() { let stdin = io::stdin(); let input: Vec<String> = stdin.lock().lines().map(|line| line.unwrap()).collect(); + for line in &input { + if line.starts_with("From: ") { + println!("!!!!!!!! {}", line); + // run matcher function + } + } + for l in &input { println!("{}", l); } |
