mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-09 16:00:35 +00:00
fix regexp parsing from tmux config
This commit is contained in:
parent
3415117b6b
commit
e53c48cc93
@ -136,7 +136,7 @@ impl<'a> Swapper<'a> {
|
|||||||
let options = self.executor.execute(params);
|
let options = self.executor.execute(params);
|
||||||
let lines: Vec<&str> = options.split('\n').collect();
|
let lines: Vec<&str> = options.split('\n').collect();
|
||||||
|
|
||||||
let pattern = Regex::new(r#"@thumbs-([\w\-0-9]+) "?(\w+)"?"#).unwrap();
|
let pattern = Regex::new(r#"@thumbs-([\w\-0-9]+)\s+(.+)"#).unwrap();
|
||||||
|
|
||||||
let args = lines
|
let args = lines
|
||||||
.iter()
|
.iter()
|
||||||
@ -166,7 +166,7 @@ impl<'a> Swapper<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if name.starts_with("regexp") {
|
if name.starts_with("regexp") {
|
||||||
return vec!["--regexp".to_string(), format!("'{}'", value)];
|
return vec!["--regexp".to_string(), format!("'{}'", value.replace("\\\\", "\\"))];
|
||||||
}
|
}
|
||||||
|
|
||||||
vec![]
|
vec![]
|
||||||
|
Loading…
Reference in New Issue
Block a user