diff --git a/README.md b/README.md index 3497912..2256a14 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ more with `--regexp` parameter. ## Prerequisites -`tmux-thums` is written in Rust. You will need `rustc` version 1.35.0 or higher. The +`tmux-thumbs` is written in Rust. You will need `rustc` version 1.35.0 or higher. The recommended way to install Rust is from the official [download page](https://rustup.rs/). ## Tmux integration diff --git a/src/swapper.rs b/src/swapper.rs index 73be56d..0b31b7b 100644 --- a/src/swapper.rs +++ b/src/swapper.rs @@ -136,7 +136,7 @@ impl<'a> Swapper<'a> { let options = self.executor.execute(params); let lines: Vec<&str> = options.split('\n').collect(); - let pattern = Regex::new(r#"@thumbs-([\w\-0-9]+)\s+"?([^"]+)"?$"#).unwrap(); + let pattern = Regex::new(r#"^@thumbs-([\w\-0-9]+)\s+"?([^"]+)"?$"#).unwrap(); let args = lines .iter()